If the yamoto was not destroyed at okinawa/never deployed by the japanese? Were any japanese/german ships taken by allied navies?
By the end of WWII it was clear to all naval powers that battleships were no longer important measures of naval strength. Carrier groups and naval aviation in general had relegated them to a niche role supporting landings.
Most Allied battleships, even very new ones, were retired at the end of the war, and many were scrapped. It is therefore unlikely that Yamato would have had much military value to the US Navy in 1945.
An older Japanese battleship, Nagato, (as well as a Japanese cruiser) was taken by the US Navy and used in the Bikini nuclear tests to determine how effective nuclear weapons could be when attacking naval units. Most other captured ships were scrapped. I believe a few of the most modern German U-boats were taken by each of the the allies for technical analysis and testing and one was actually used by the French after the war.
It's far more likely that the Yamato, had she not been deployed in Operation Tengo, would've been docked in Kure naval base with most of the other remaining Japanese surface assets. In July 1945, the US launched a massive air strike on Kure, sinking every Japanese capital ship there. So more likely than not she would've been sunk anyways.