Why do Americans believe that the U.S is the greatest nation in the world?


Well that’s obviously part of the knock against Americans because they are not exactly the most humble people.

You see on Quora all these anti-American much upvoted posts involving America’s involvement in all these wars, yes we all know America has a lot of issues. It’s a country where you have drug addiction everywhere, rampant homeless population, expensive healthcare, racial riots, gun violence and mass shootings, a history of invading other countries or getting involved in wars that are not related to them (Vietnam, Afghanistan, Iraq etc), and historical issues with slavery, massacre of indigenous peoples, internment of japanese, CIA experimentation, racial discrimination etc

Yes we get all of those issues people love to talk down on America all the time.

But we also have to remember the good parts of America too:

-The first modern democratic republic in the world (taking influence from the Roman Republic) and the first successful revolution against a major power
-a country that historically attracted the majority of the world’s immigrant population including some of the brightest talents in world history (Albert Einstein, Elon Musk and Nikola Tesla come to mind but there are many many others)
-lower tax rates than most other developed countries
-an atmosphere that is very conducive to entrepreneurship and startups. America has the most widely available access to capital in the world.
-higher salaries for professionals, and in fact the highest amount and the most resources in places like Silicon Valley, Hollywood and Wall Street that attract the best talents of those industries
-The world’s most advanced military by quite a large margin
-The first nation to go to to the moon (but not the first in space give the Soviets credit for that)
-US Dollar is the most widely used and the world’s reserve currency
-the world’s largest GDP and biggest economy since 1890, although China is set to overtake it soon
-while America entered VERY late in WW1, and 2 years later in WW2, and I think D-Day is highly overpublicized (the Russians were going to beat the Germans anyways, D-Day just hastened it), we do have to credit to America for beating Japan. While China had been fighting Japan for many years at that point, it was America’s military that badly damaged Japan’s imperial army and it was America that forced Japan to surrender after dropping 2 atom bombs on them. 
-at or near the top in industries like AI, computers, pharmaceuticals, medical, aerospace and military equipment
-lest we forget, the country where the groundwork for virtually all modern technologies such as computers, TVs, telephone, phonograph, lightbulb, film, internet etc were invented and/or popularized.
Some of the most influential technologies of all time like the transistor were invented in America’s Bell Labs, and some of the most influential inventors of all time like Nikola Tesla and Thomas Edison discovered their inventions in the US. The first working plane (Wright Brothers), and mass assembly (Henry Ford) were invented in the US. Intel, IBM, Microsoft, Apple, HP, AMD etc all pioneers of the computer revolution, are American. Nuclear weapons, for better or worse, was developed by the US. Skyscrapers first appeared in the US.
-A very diverse country. https://qr.ae/pG6nCK is a good answer that shows a lot of diverse and beautiful American scenery. 
-US has 121 out of the world’s 500 biggest companies, and it still has the most billionaires out of any country
-US has the largest stock exchanges in the world, the largest consumer market in the world, and still attracts the most immigrants in the world
-The most influential soft power in the world. Worldwide everyone knows brands like Coca-Cola, Starbucks, Subway, McDonalds, Pepsi, KFC, Disney, Warner Bros, Apple, Microsoft Google, Facebook, Youtube etc American brands have the most global recognition out of any country
-American books, movies and music have significant cultural influence. Writers such as Ernest Hemingway, Mark Twain, F Scott Fitzgerald, John Steinbeck, Stephen King are all very well known. From classic movies like Casablanca, Citizen Kane, Vertigo, Breakfast at Tiffany’s, Rebel without a Cause etc to modern movies such as The Avengers, Spiderman, Inception, Star Wars, Frozen etc Hollywood movies have always captured the global public’s attention. Rock bands like The Beach Boys, Aerosmith, Guns N Roses, Nirvana etc Jazz artists like Miles Davis, Charlie Parker, John Coltrane, Duke Ellington, Billie Holiday etc solo artists from Frank Sinatra, Buddy Holly, Michael Jackson, Elvis to Mariah Carey, Arianda Grande, Britney Spears, American music have always been the most globally popular in the world. Actors and actresses as iconic from Jimmy Stewart, Humphrey Bogart, Katharine Hepburn, James Dean, Marilyn Monroe to Leonardo DiCaprio, Harrison Ford, Scarlet Johansson, Johnny Depp, Meryl Streep, they are amongst the most recognizable and famous celebrities in the world.
So perhaps some of these reasons can explain why Americans are so proud of their country and why Americans continue to insinuate that their country is the ‘greatest in the world’.
While I think that Americans should be more humble about themselves, I do admit they are quite self-critical at times (especially when Trump was in power), and they do have justified reason to think that since America is the world’s dominant superpower since WW2 and the most influential country of modern history.