If I invest in a popular project does that make my money safe from scams or popular projects can turn to scam as well?
Being popular doesn't mean you are in a safe project. There's no such thing as 100% safe in any project however if the project already established a good community, and foundation, and working for several years already, it unlikely won't turn into a scam.
My advice is, for now, try to stay away from investing in new projects. I'm not saying it's not good to put money on new projects but you are not ready yet to face the risks of doing that. Build experience first and as soon as you can now determine if that new project is good or not, then you can now take yourself to another level of risks and challenges.