That's actually classic 7 behavior - you get these flashes of deep spiritual insight that make you sound like an ancient sage, then turn around and do something completely childish.
It's not really immaturity though, it's more like your soul operates on multiple frequencies at once. The wisdom comes through clear as day, but your human vessel is still figuring out how to integrate it all.
The fact you're aware of it means you're already working on the integration. Most 7s just stay stuck in the spiritual tower wondering why people don't get them.