Do you talk to yourself the way you talk to me? If so then you need to stop both.
When I was younger I was partly guilty of this and still occasionally catch it. But we are always more sensitive to vices in others that we police in ourselves.
A lot of this advice for how to improve yourself so that other people like you comes off so incredibly vain, neurotic, and juvenile.
Making friends isn't trivial, but it isn't a complex thing - just ask people you sort of vaguely know to hang out sometimes. Asking people to spend time together is about 10,000,000% more effective than any other strategy.
I don't have any objection to suggestions like "help people" or "be [a] good friend" or even "cook" and I think they're a core part of making friends. Today I cooked dinner for two friends and just got back from driving one of them home. They've been similarly kind to me in the past. Friendships are built on foundations like this.
It's absolutely correct that you need to invite people to do stuff before you worry about whether you're helpful enough, but you also need to go from being two or more people who kinda sorta know each other to actual friends.
Seriously, do you only befriend perfect people?
If I may be blunt, it sound more like you might have some self-esteem issues, or shame, or just plain immaturity.