You won't get a girlfriend, until you will be perfectly happy without one.
This is a great advice. and even if you do get one, she will be just as insecure and broken/lonely and it would only bring both of you more suffering at the end when the whole thing will fall apart.
TO answer to your question I think there are things you need to do from the inside and there are things you can do exeteranlly.
Internally
1. Meditate every morning/night
2. Modify diet - read Gandhi's diet while he took a vow of brahmacharya (celebicy for life) it consist mostly fruits and nuts
3. Modify sleep - avoid staying up late and get just enough rest no more
4. daily exercise - this will help you so much with your energy flow and make you feel good overal
Externally
1. Go to where other people hang out that you have something in common with - this can be the hardest because we are not used to it - but finding a group with common interest helps with loneliness - Loneliness is when we don't relate to people around us, and intimacy is when we can meet people who speak our language
2. Join an accountability group here - it has been super helpful for me
3. Pour your new found energy into something new - start a project that fires you up. Think of creating a new course on udemy or start a podcast or a youtube channel or something you really can get excited about which will take alot of your time, and do it for fun.
THe fact is if you really do what you need to do to advance your soul - your right partner will find you in due season - also remember the purpose of your life is not to get laid but to evolve - so put your focus on the main purpose and let the rest fall in to place on their own.
THink about it this way - imagine your evolved version who is well taken care of, self controlled, well spoken and have great social skills and zero neediness - how impossible it would be for you to be single for long.
Women are 10x more aware of body language, they can read you so fast. If you are truly free from the need to have them, they will come to you like bees go to honey, but if you are needy, desperate they can smell that too and they will always see you as the 2nd option because they are designed by nature to choose the man who is the most confident -non needy.