> The US defeated Spain in a war of Spain's making
The Spanish-American War was driven more by the US political intrigue than Spain's. The USS Maine's explosion in Havana harbor (where it had been sent to help protect US interests in the Cuban War of Independence) drove American paranoia about Spanish interference, which led to the US declaring war to deprive Spain of its remaining territories in the Americas.
> The US ended colonial dominance of the Philippines
The US Pacific detachment happened to be near Manila when war broke out, handily destroyed the Spanish fleet there, and then assisted the ongoing Philippine revolt. And then took the Philippines as a colony, suppressing the revolution they had just been supporting not a few months earlier. They only started granting the Philippines its independence in the 1930s.
While American colonization was arguably more benign than other countries, don't kid yourself that it wasn't colonization, and don't kid yourself that it was done in accordance with the wishes of the local populations.
> Similarly the US didn't wake up one day and decide to invade Mexico as an expansionist policy. Mexico started a war with the US
American settlers started squatting in the region of Texas. When Mexico tried to assert its authority over Texas, the region rebelled and formed an independent country, which Mexico objected to but did accept to some degree as a de facto resolution. However, the Republic of Texas tried to claim as much land as it could--ideally as far as the Pacific Ocean, but usually cited as the Rio Grande border. After the US annexed Texas, it took the Rio Grande as the notional border, and moved its troops into the disputed region to provoke Mexico, taking the territory of Alta California as its prize in the ensuing conflict.
Functionally speaking, it's actually not entirely unlike the Russian annexation of the Crimea in modern terms, if the Ukraine were to go to war against Russia's violation of its territory.