There are so many possible reasons to have that urge. You could be bored with your life in general. It’s possible your girlfriend isn’t the right person for you and you are longing for something that she can’t give you. Or maybe your relationship could be getting stagnant and the two of you might need to try some new activities, either on your own or together. Are you repetitively doing the same things in or out of bed? Or, maybe you could have a fear of intimacy? Strong feelings can make people long for the easier, less emotionally involved excitement of a random hookup.
You’re young. You may not have learned how to authentically be yourself in your relationship and hiding yourself or constantly worrying about what the other person thinks can be exhausting.
Or, maybe you feel you haven’t sewed your oats yet and you’re wondering what you’ve missed out on. Only you know the real answer to these questions. I would suggest some serious soul searching and then an honest discussion with your girlfriend. Ask yourself what your relationship means to you, what you want from a relationship and what it will take to get it. Is your girlfriend someone you want to spend the rest of your life with? Are you afraid of being alone and hanging on to a relationship that isn’t right in order to avoid it? Would the two of you prefer an open relationship? Is there some other area in your life that could be affecting your relationship?
Just throwing stuff out there…