In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Muslim youth should do the following to avoid going astray:
1- Be mindful of Allah,
2- Abide by the Sunnah,
3- Make use of their time, and
4- Avoid bad companies.
Answering your question, The Permanent Committee for Scholarly Research and Ifta’ in Saudi Arabia, states:
Muslim youth should be mindful of Allah (Glorified and Exalted be He) in all their matters and live according to the pillars of Islam.
Muslim youth also have to abide by the Sunnah of their Prophet Muhammad (peace be upon him).
Muslim youth should not waste their time and they have to busy themselves with what is of benefit for them in this world and the Hereafter.
Muslim youth should avoid and guard themselves against bad friends to be safe from their evil and shield themselves from trials.
Almighty Allah knows best.