Don't beat yourself up. I think a little rebellion is a natural part of growing up and becoming an adult.
I rebelled for a time in my early 20’s. And I was raised by VERY Conservative parents and went to a Catholic school. In my case I think my peer group was still romanticizing the Hippies who had come just a few years before us.
It didn’t take long being out on the job market, married and having kids to get my mind right again.
Of course kids today don’t want to get married and can’t find a job. So they may linger in this twilight adolescence for a very long time.