As for his habit of distorting actual events of his life to make himself seem more grand then he actually is maybe that has something to do with some kind of insecurity issue. Maybe he wants to impress his audience or get them to like him more?
In my opinion it mostly has to do with needing to inflate his success to stick it to his classmates and teachers from high school who thought he wasn't intelligent or important. I've put myself through the terrible burden of actually watching most of his videos and he did reveal an 'origin story' which explains a lot about his ego. In his podcast Common Ground episode 6 he revealed that he now considers himself to be pretty intelligent, but no one in his school ever told him he was, it was amplified by also getting bad grades, and his opinion on his own level of intelligence didn't change until he started youtube, where people began telling him how intelligent he was. He also even admits that he's resentful about the educational system because they made him do things like have proper grammar and do math correctly which he considers unimportant.
Now for one, he's not actually intelligent as he claims, and I can elaborate more on that if anyone would like but I'll keep this post on topic on the origin of his ego. The origin of his ego is entirely from the feedback he received on his youtube videos when he blew up during the pandemic. As by his own admission, he never really thought he was intelligent during high school (which was affirmed by the fact that no one else thought he was alongside how he got bad grades) so he was a lot more normal back then. When he got popular, people would constantly say how intelligent he was since he had a lot of history knowledge, and this just grew over time until he began to actually believe he was intelligent. When he evaluates his past now, he does it from a perspective that he's intelligent, which leads him to believe he was some smart kid who was held back not only by his classmates and teachers, but by the entire structure of the education system.
To me this is really the key narrative that explains most of his positions, he perceives himself as an above average, intelligent, successful, etc. person who was treated as average or below by everyone around him and he's extremely bitter about that. Everything he does ultimately HAS to be contextualized within this oppression narrative: education is completely broken (because it failed an intelligent man like him), the ruling class are evil (because they are mean leftists like his teachers and classmates at his leftist quaker private school), academia is wrong and broken (because they didn't let a brilliant academic like himself into their elite circles), etc. He certainly does hold rightwing positions, but in my opinion this more likely because it fits better within his personal victim narrative than because he just believes it that deeply. All his politics seem to be derivative of the fundamental idea that modern institutions are irreparably broken (because these institutions oppressed him), which then expands into him finding every reason as to why society will completely collapse because of these failed institutions. To evidence this a little more, if you pay attention many of his posts about wider societal problems do ultimately seem to be (in some way) about himself. For example, in the tweet below he makes a point expounding on the virtues of not overthinking, citing how giving academics money and power in society is a negative, when someone pointed out how odd it is that he mentioned a random example of riding a bike. He flatly admits that this was about his own experience, which is a fair piece of evidence that he will insert himself and his own issues into posts that are supposed to be generalized about politics/society.
Furthermore, he seems to view himself now as some sort of counter-academic/revolutionary intellectual figure, as evidenced by some tweets below alongside a clip from his A Manifesto for the New Right, and that's not even to get into the delusions of grandeur about how he views his credentials.
TLDR: All of this is to conclude that his ego comes from youtube comments constantly calling him intelligent, which led him to believing he actually was, which then led him to becoming resentful towards his high school classmates, teachers, and most institutions in society who he now perceives as having wronged him. This (and likely his potential psychedelic/drug/alcohol problems) has led him into a downward spiral of egotistical insanity where he believes he's a revolutionary counter-academic intellectual guru spiritualist who is making an actual academic body of literature, alongside influencing some sort of revolutionary rightwing movement against the far right and far left. Just to add some icing on the cake, here's him saying in his video How to Survive the Coming Crisis that he's more successful than everyone in his high school and college, including those who went to Ivy League universities.