Read their whitepaper!
Yeah. That simple. You look at how unique their project is and how the community would benefit from it. Then next is the team behind it which is really important if they're legit or not. And you can add a little bit of extra research about it.
Yep that most likely is how to know a scam from not. Very simple but still a little risky. Knowing that, potential scammers would only create a carefully laid out whitepaper to lure in potential investors. So we need to be extra careful.
However, it is best to participate in a project of which you know the dev team or you have worked with before and trust.