The main immediate effect of the Spanish-American War (for the United States, at least) was to make the United States an imperial power.
Before this war, the US had had very little in the way of overseas possessions. That changed with this war. The US took effective control of Cuba. It also took complete control of Puerto Rico, Guam, and the Philippines. By taking the Philippines, in particular, the US became an imperial power. The war therefore also helped America’s standing in the world. It was the first time the US had defeated a European country in a war and it showed that the US was on its way to being a major power in the world.
My previous comment was about the Mexican American War. After the Spanish American war, the United States expanded its borders by purchasing several islands from Spain. We were able to expand our Navy and our maritime interests. Therefore, we sparked our age of Imperialism. We justified expansions in the Caribbean through purchases of islands from Spain with the Monroe Doctrine.
The United States was able to buy Mexican land that includes the current states of California, New Mexico, Arizona, etc. We also solidfied our claim over Texas' territory and its extension to the Rio Grande River.