They're angry/bitter to begin with. A boy or girl doesn't transition if he/she is happy with himself/herself. Unhappiness often manifests as anger/bitterness. Preventing transition won't solve this problem because it's not the act of transitioning that causes their unhappiness which manifests as anger/bitterness. After they transition, a lot of them find that transitioning wasn't the magic fix to all their problems they thought it would be. This then causes hopelessness which is often the cause of radical actions.
My theory is that a lot of trans are lacking love. We used to have Elliot Rodgers shooting up schools and Incels were put on the terrorist watchlist. I think we have the exact same problem now but the Elliot Rodgers of the world are transitioning as an attempt to get better access to love. I believe that a lot of boys are desiring women (and desiring women to desire them) but they aren't getting anywhere in this pursuit so they turn to porn or other fantasies (such as anime) to feed this desire but the desire for the opposite sex becomes so strong and without any other human to direct it toward, they direct it to themselves. They want to become the attractive man or woman of their desires since they can't have it any other way. This leads to trans porn and gay curiosity which they indulge and then they start to question. They eventually make their way to LGBTQ+ communities that further feed their thoughts and then they arrive on transitioning but the transition is false because it's not true gender dysphoria. They're trying to fill the love-void they feel within them with these false-fillings connected to LGBTQ+ (Trans). The hope drives them but in time, they realize it's not working to fill the void they are seeking to fill.
As men and women grow older, they learn to better manage/cope with the loneliness and empty feeling but this feeling for younger people is extremely strong and can lead to such bitterness/anger and hopelessness that they lash out.
That's my theory on what exactly the problem is. I don't think there's a real solution but I think we could try culturally to put far less emphasis on love, sex and relationships. We could also try to find ways to help manage this sort of loneliness/emptiness for both adults and teens. Right now society seems to have a very naive stance on the subject in which the adage is: "there's someone for everyone, just work on yourself and you'll find someone eventually. Don't worry about it." The problem is that this is false. and when this stance is taken toward teens/adults who have no ability to find love, they get angry/bitter because it's as if they are being ignored or patronized. Over 50% of adults are single now. It's time society faces the truth on this subject and realizes that most people actually won't find someone. I don't necessarily have the solution to this problem. Segregating men and women in k-12 might actually be a decent idea to help combat the issues. It doesn't solve the underlying issue but it might kick-the-can down the road for teens before they realize how they are undesirable to a point where they might be better able to manage this instead of lashing out. Also, perhaps some Hollywood entertainment that tackles these issues by showing how an average person is entirely ignored by the opposite sex but that this leads to more time for them to work on projects that are beneficial and "save the day". I think just more honesty surrounding men-women and relationships would go a long way also. Everyone seems to lie about these subjects... but it might be difficult for the truth to come to light because it appears the lie is part of the game of attraction.
Anyway, those are my thoughts... You guys need to remember that a lot of the people alive today wouldn't have made it to their teenage years in the past but due to modern medicine, hygiene practices and sanitation innovations, the quality of humans has decreased on average. It may just be that genetically we're actually programed to seek-out the top half of the gene pool (even those at the bottom seek them out) such that the majority of people are going to be without a mate whereas in the past this wasn't the case because the only people who made it to adulthood were the top half of the gene pool.