Very poorly. Yamato initially had only 24 antiaircraft guns, 25mm and mounted mostly amidships. She would have been easy meat for Marine and Army Air Force aviation, let alone the Navy’s bombers. Lacking serious air defense, she would have been sent to the bottom in short order by whoever’s air power found her first. Especially after American air power expressed their extreme displeasure with the IJN and sank 4 carriers plus destroyed 332 of their aircraft at Midway.
The Japanese eventually figured out this was a problem and updated the AA armaments to a total of 162 25mm guns, but that wasn’t done until the big overhaul of 44-45. She also didn’t get aircraft search radar or gunnery control radar until this overhaul - without which, again, she would have been easy prey for aircraft and could not engage beyond visual range or at night without extreme difficulty, something American battleships like the South Dakotas could do from day one of the war.
The only way that Yamato would have had a decisive advantage is in a pure daylight, visual range gunfight with low cloud cover preventing air power from coming by to say hello. She wouldn’t have been good at shore bombardment either because someone forgot to make sufficient quantities of rounds suitable for shore bombardment, which is why she spent most of the war at Truk. Well, that and the fact that she drank more fuel than all her escorts combined plus a nice margin over that and the Japanese weren’t flush with fuel even before Pearl Harbor.
The Japanese captured the Dutch East Indies with their huge oil supplies, early in the war. Fuel only became a problem when they had lost all or nearly all their tankers late in the war.
I agree the Yamato was not supplied with enough anti-aircraft but it was probably not even possible to put enough. The Musashi added a large number of anti-aircraft guns and even they were not enough.
That is why I mentioned she would have to return to the safety of the Lae air defenses. The Lae squadron was the best in the entire Japanese Navy. We would not have risked our few aircraft carriers in their coverage area. The zero had a greater range than our planes too.
I had no idea the Japanese were short on ammo. If so the Yamato could have been an escort for the smaller and older battleships which got beaten eventually by the North Carolina and, I think South Dakota. Night fighting was what the Japanese were best at early in the war.