Given Trump's age, he probably did learn about Guam in high school or college, in History courses that covered WW2. Or maybe in coverage of the Spanish-American War.
ETA: Since US B-52s during Vietnam flew out of Guam, Trump likely heard of Guam then as well.
Then again, Presidents of the US have these outfits called staff. No POTUS is remotely close omniscient, but they can appoint staff and draw on Executive branch resources to learn just about anything they need to learn.