Sympathies OP, I can totally relate
I'm naturally slim, and struggle to put on weight
I find it very hard to get my weight up, but it'll drop off incredibly quickly
I was also ordered by a Dr to put on weight - my fertility consultant said I needed to get my BMI up to a minimum of 18 before we could start IVF - it was hovering above 17 at the time (my infertility isn't weight related BTW).
I thought I was eating shitloads and had some ridiculously fast metabolism (people would often remark on how lucky I was because I could scoff so much junk yet remain slim)
I had to try and cut out sugars and simple carbs and eat low GL because of my PCOS, but yet put on weight. Which was really hard as eating low GL is a very good way to lose weight - and I had to do the opposite
I started tracking what I was eating with My Fitness Pal, to monitor calorie and nutritional intake. Turns out I was eating WAY less than I thought I was. I tracked every mouthful and ended up massively upping my portions and eating about three extra small meals a day (so, so many avocados, oil on everything, peanut butter, protein powder and Greek yogurt, eggs all the frigging time). I couldn't believe how much I needed to eat to get 2000 calories a day down me!
It did get a bit easier as the more I ate, the more it seemed to stretch my stomach so the more I was able to eat, and did seem to then stimulate my appetite a bit, which made it easier to force food down
It took a while, but I did get there. Unfortunately stress and sadness after my miscarriages meant all the weight fell off very quickly and I just haven't had the motivation to work to get it up (I have a similar issue, I take strong opioid pain meds and they completely kill my appetite). I know that right now the reason I'm so underweight is because I'm simply not eating enough.
I don't expect sympathy for my weight issues, but I do hate being told how lucky I am to find it hard to put on weight
Can definitely recommend MyFitnessPal to help you get the weight on (as well as getting your thyroid etc checked)
I found it easier to front load my calories and eat 2-3 breakfasts, so I'd feel less daunted by having to eat enormous dinners after work, because I'd not eaten enough during the day. Good luck!