You need to be proactive. A friend or wife or husband isn't going to just appear. I'm not very outgoing, I never desired friends, though I enjoy talking to and helping people. I worked, came home, enjoyed my hobbies and repeat much like OP. Eventually, one day, I did start to feel lonely. Pretty strongly actual.
Eventually I met my wife, but I didn't meet her doing any of the things people suggest to meet people. But doing all the things I did, working on myself, growing my social skills over that time period of self improvement, it all definitely had a massive impact. If I just kept doing my old routine I would never have met her, even if all those things didn't directly connect us.
Going to the gym is good advice. I went to the gym, ate better, felt better. It clears your head. Makes you feel more confident. You may meet someone there or may not. It shouldn't be the reason for going.
I volunteered at an animal shelter for a while. Gave my life more purpose, I looked forward to it, and was around people more. Find something you'd like to volunteer to do. Or yes find a hobby that gets you around people. You know what, go buy a gun, and join a club. You can be a fat ass and shoot well. Then once you're comfortable go do some low level matches and have fun.