HEY!! Don't be mean to my comrade
We are each molded by our environment to a larger degree than we like to think.
The mark of a good person is NOT "did their environment happen to mold them into a good person."
The mark of a good person is deciding what they value, and then striving to align themselves with those values.
A necessary (but often painful) step is taking inventory of where they're at today and seeing where they don't align with their values. Each person will find themselves in varying degrees of misalignment with their values. Nobody starts out perfect, but nobody is irredeemable, either.
I'm proud of you for taking that step, and I'd be willing to bet that the parts of you that you don't like are the direct results of your environment. I encourage you to look into the Internal Family Systems Model - it was extremely helpful framing for me.
One of the greatest injustices in life is that we each have to try to deal with the ways our environment fucked us up. I've heard folks say "it's not your fault... but it is your responsibility."
I say all that because I don't want you to be too hard on yourself. It's awesome that you want to be better! You're not gonna just flip a switch and fix everything, and you'll have setbacks, and that's ok too!
If you're taking intentional steps towards being better, you already are a good person.