You are too focused on the lack of having a girlfriend as the cause of your loneliness. Loneliness often goes beyond that. Oftentimes, loneliness is caused by a feeling of isolation.
Are you being social with your peers? Are you going to parties or social events? Are you getting outside the house and interacting with your environment in some capacity?
If you aren’t doing these things, getting a girlfriend isn’t going to cure your loneliness. Even if you were to get a girlfriend, she would soon gather that you don’t want to do anything unless she is involved and she will be turned off by this.
You know what happens next?
She dumps you and you are single again.
Take this time while you have no girlfriend in your life to actually improve your social life and put yourself in more social environments.
Getting into the habit of doing this, not only improves your social skills, but it also puts you in a position where you could meet your future girlfriend at a random social event or activity.