Tips for weight gain!

Please, I’m desperate at this point. I’ve always been small and petite but I’ve had a time in my life that I was at a good weight, I weighed 121lbs/55kg and I was happy and way more confident than I am right now. I’m 19 years old, 5’4/164 and I weight 99lbs/45kg and I want to gain weight. I have tried so many things but nothing works. I don’t feel good in my body, everything always hurts, don’t have energy or power to do ANYTHING at all. I want to be happy and I’m not happy at all. All I see online is “losing weight” so I can barely find any good information online on how to gain weight.