Is masturbating wrong?

So I’m 17 and I grew up in the catholic faith and they say that masturbating is wrong and selfish. Whenever I was horny and wanted to masturbate I would just try to think of something else and hope that it would pass. But recently I’ve been squeezing my thighs, rubbing my clit or rubbing off a pillow but I really want to see how it feels to stick in a few fingers. I just don’t know if it’s wrong or right. What do I do?