Harry being annoying, egotistical and selfish actually makes him a great character because it a) makes him a realistic teenager who has b) suffered and feels about it but lacks the maturity to handle it, and c) makes his sacrifices compelling because he is not just overcoming outward obstacles but inward ones. That’s good writing. In the fandom, there’s a name for perfect protagonists and it’s called Gary Sue/Mary Sue. And there are about a million fics to read and they are boring AF. But help yourself.