There’s nothing inherently wrong with creating for yourself. If you make music or art or anything like that, you can – and should! – make what makes you happy. Make music you want to listen to. Make art you want to look at. Write what you want to read.
But fundamentally, that’s a different skill set than being able to do those things professionally.
See, doing anything professionally is pretty much defined as “trading a thing I can do to other people for stuff they have that I want,” i.e. usually money. You can’t always have it both ways. Sure, you can create things that appeal to you and then look for the incredibly narrow audience of people whose tastes align exactly with your own, but that mentality is why there are a lot of “starving artists.”
Selling to other people isn’t selling out. If you’re a brilliant musician and you really like jazz, but someone is willing to pay you to produce a country album, then produce the country album! The money you make lets you pursue other passions and do what you like. Artistic integrity is a real thing, but it’s diminished by doing harmful things, not by doing perfectly fine things that just don’t align with your own preferred tastes.
Helping others is a wonderful virtue, and doing so with creative gifts that give you more freedom to play in that playground is a huge win/win. Don’t avoid it.