The United States had state sponsored slavery, segregation and racist violence inflicted upon its own citizens for 200 of its paltry 250 year existence.
Such a nation cannot be considered great.
Generally the label of greatness applies to countries in Europe, Asia and Africa - regardless of their current situation.
It does not apply to the new world as these countries have not had enough time to earn that label.
To earn a label of greatness, a country's civilization needs to go through ups, downs, upheavals for a considerable amount of time and still survive.
Europe, Asia and Africa are 1000s of years old and have produced and have been instrumental in producing/inventing most of what the Americans built on in the 20th century.
Heck even the "Christian nationalism" these guys promote these days was invented in Asia.
As such the US is absolutely not the greatest nation on earth.
They are the oldest democracy but they fail even there, so no one can reasonably call them "greatest nation ever known".