Academics commonly get invitations to conferences. Some of these are legitimate, but many are simply scams or bogus. How can you tell at a glance which is which?
The fastest way possible is to use a policy of "don't call me, I'll call you" with venues (conferences, journals, etc.). If you don't already know them, discard correspondence from them. In most cases there are already too many options to chose from on where to go and where to submit, so there is little to lose from discarding unsolicited contact from people you don't already work with.
The next, more open, version is to ask a few sensible people you already know. "Hey, have you heard of XYZ conference?" Assuming the people you know and respect are not carbon copies of you, this should net you a very high percentage of recognition if the conference is worth bothering with. Asking people you know and respect, and who are not exactly like you, is a great way to broaden your horizons if you are not yet familiar with what the useful venues are already.
Note that I take a somewhat snobby view of venues here, in that I don't actually care about mere legitimacy, in the same way I don't care to eat at a restaurant because I won't immediately be robbed for going in. I want a way to spend my time, effort, and money that is much better than my existing options. Some conference I've only heard of because of some unrequested 'invitation' is vanishingly unlikely to provide an option better than the ones I'm already aware of.
If for some reason something new appears that really piques my interest, I would look to see who supposedly is on the organizing/editorial committee, and see if there are people I know and respect and would like to work with (and if so I might also contact them directly to ensure they actually are affiliated and approve). I would also read previous papers/proceedings/abstracts and see what they have to offer. If I am not impressed with the quality - really, genuinely impressed by how useful and applicable the papers are to my work - easy slam-dunk into the trash bin.
Is it a conference you've heard of? Do you know any of the organizers? Do you know any of the main speakers? If the answer to all 3 questions is no, it's probably not a worthwhile conference.
Academics are usually fairly aware of the main conferences and researchers in their field. Most of the scam conferences I get invites to are in far away locations, in fields that are at best tangentially related to mine (signal processing, education), or are hopelessly broad in scope. They are put on by Universities and organizers I've never heard of. There is very little chance of mistaking them for a legit conference.