Why have aliens never visited Earth?
Scientists have a disturbing answer
https://www.space.com/alien-civilizations-doomed-to-collapse
I don't agree with the above theory.
Aliens haven't visited earth because humans are still primitive primates.
The aliens are probably observing us with advanced 'telescopes' that can see high res details on earth from light-years away, or they have sent stealth probes to record everything happening on the surface of the earth. We are still too primitive to even guess what kind of advanced tech aliens have.
As long as humans are restricted to our solar system, aliens won't care much about us, but if we ever invent FTL tech. aliens will probably make first contact.
The first contact theme in the Star Trek series is the most logical theory for why aliens haven't contacted us yet.