France not selling the Louisiana Purchase would have massive affects on history, for sure. The most immediate changes are discussed in an essay from the What If? Book called "Napoleon's Invasion of North America". In that book, it suggests that Napoleon would have fled to America after being defeated in France, until he is eventually defeated at the Battle of New Orleans.
This means that Louisiana's fate, and by extension the rest of western North America, is decided by the European powers in the Congress of Vienna of 1816. Colonialism of America is still the norm since the Monroe doctrine won't exist for nine years, and the fledgling United States had only just recently made peace with Europe in the Treaty of Ghent.
The Congress of Vienna could decide to return Louisiana to Spain (who Napoleon stole it from), give it to Britain (and merge it with Canada) or keep it with France under the restored Bourbon dynasty.
Had they given it to either Britain or Spain, then the USA's influence in the world as a superpower would be severely neutralized. Much of America's population, resources, and manpower would be greatly limited, and America's influence over the western hemisphere and the rest of the world in the 20th century would be a lot smaller, if it exists at all.
The Texas Revolution is butterflied away because American plantation settlers can't reach the Mexican Empire, and California would likely still be part of Mexico, if not an independent country. Hawaii would likely become a European protectorate, possibly Britain or Japan, until its eventual independence in the 20th century as a monarchy. Alaska would likely be sold to British Canada. On the flipside, the US Civil War is butterflied away too, because there are no western territories to dispute over. The US would likely abolish slavery later in the century under peaceful terms.
If Louisiana is given to Spain, then it would likely become an independent country almost immediately. The Spanish Empire was quickly collapsing in the 1810s into the 1820s, with their entire colonial sphere breaking off as independent. An independent, powerful Louisiana is something I've seen in other timelines on the Wiki, but certainly not explored nearly enough in my opinion.
If Louisiana is given to Britain, then that would make British domination of the western hemisphere more secure. The Monroe doctrine wouldn't exist, as Britain would assume responsibility to police the Americas and systematically end colonialism. With Britain's support, then the Second Mexican Empire would likely not fall, and Spain would control the Dominican Republic a lot longer.
After World War II, either scenario faces a significant problem with the rise of communism under the Soviet Union, since there is no superpower to match the Soviets. All the US-backed coups and proxy conflicts around the world are either done with a lot of help, or never happen at all (Korea, Vietnam, Israel, Iraq, Colombia, Bolivia, Afghanistan, Iran, Taiwan, etc.). While the US might still develop the Atom bomb and NATO with significant help from the rest of the West, I could see the USSR being a lot more successful before their eventual collapse.