Depending on how many times you've tried masturbating and how many ways of masturbating you've experimented with, it may be that you just haven't found the approach that works for you. There's no one, specific way of masturbating that's guaranteed to work for everybody, because each body is different. Does that make sense? This article might help you find some ideas on different ways to try masturbating: How Do You Masturbate?
It may also help to know that being able to insert things like fingers into the vagina doesn't have anything to do with someone being a virgin. Part of the reason for that is that virginity is an idea, not a physical state (which is why people can have different definitions about what "counts" as virginity). But also plenty of people use their fingers (or sex toys) for masturbation, or simply do things like use tampons or menstrual cups, long before they have vaginal sex with a partner. So if you want to experiment with inserting your fingers, that's definitely something you can try.