"Brain health: Marijuana can cause permanent IQ loss of as much as 8 points when people start using it at a young age. These IQ points do not come back, even after quitting marijuana."
https://www.samhsa.gov/marijuana
(References at the bottom)
The key here is "at a young age". People who don't start pot until their late 20's have fewer mental side effects than those that start in their teens.