The Short Version
The evidence shows Guam became a U.S. possession as a result of the Spanish-American War. Spain formally ceded Guam to the United States in the 1898 Treaty of Paris, the peace settlement that ended the conflict. A timing nuance remains: Guam was militarily seized during the war, but legal transfer came in the treaty.