米国 isn’t formal. Using beikoku makes you sound anti-US. Japan uses アメリカ for pretty much any reference to the country. Beikoku is typically used just for the sake of not using the proper country name (according to natives I’ve spoken to, at least). Unless you’re hearing someone rant against Western culture/people I’m told you’ll almost never see that in modern day Japan.
The Kanji typically means the US, the jukugo for south america is an exception. This shouldn’t be surprising as “America” itself can mean both concepts in English. 全米 is used to mean “the entire US”. You’ll find as you advance that many kanji have different meanings based on the specific jukugo, or if it’s stand-alone or accompanied by okurigana (such as 変 which means one thing half the time and the other half another).
I actually learned not to use beikoku because it makes me sound anti-US not two weeks after getting to have an online conversation with my favorite mangaka. I also thought it was the formal pronunciation but must’ve ended up sounding like a jerk ![]()