As abbotsbury said, it needs nuance. I am not good at that but I want to discuss, so I’ll write it below.
Mainly your point that 18+ year olds don’t have mature thinking patterns in some cases if not many: I’ve read that 25 years of age is when our brains basically start solidifying (I’m forgetting the actual term) and is why alcohol is recommended against until that age, but even that’s actually supposed to be fuzzy because aging isn’t a clear cut thing and brains and bodies age entirely differently so maybe if some kind of regulations should be set it should be between 16-27 for trial as adults if the need is felt with the cut-off for such judgements being less lenient as their age gets closer to the limit ^((or more lenient, I’ve confused myself in how this should be worded)^)
Then again this is for a justice system which is not focused on reparations through punishing the preparator instead of corrective measures and trying to create a society where crimes are less likely (equitable society, or a healthier outlook for mental and physical health, etc)