You can kindly prevent scams investment by searching thorough by the quality of their project the promising, future and also the people behind of project if this thing you do you can avoid losses of funds.
Promising projects can actually turn scam still. There had been lots of legit and promising projects back 2017 and their prices are also hitting its ATH but after the bulls are replaced by the bear market for almost 3 years, the rest of them are gone already. The team turned scam.
There are altcoins that are safe for investment but not all. Just pick the top 10 at least those coins will have a higher chance of them not scamming.