I lost weight with both pregnancies in the beginning and did not gain either time until nearly the 3rd trimester.
With my dd, I did not have m/s and ate pretty much whatever I wanted so no idea why I lost weight early on. However, I ended up gaining 38 lbs by the time I had her. The last 8 lbs I gained was between May 1 (my due date) and May 5 (her b-day). I had so much water retentinon and swelling it was ridiculous! I couldn't believe I gained 8 lbs in only 4 days! I also lost a lot of that as soon as she was born from having all that water retention. She was 9 lbs 7 oz.
With my ds, same thing. I lost weight early on but I was sooo nauseous with him for the first few months too. I ate healthier with him at first too, not because I wanted to but because my main food aversions with him was anything with sugar in it! I can't remember exactly how much I gained with him but it was only around 20 lbs or something like that and he weighed 9 lbs 2 oz and was 9 days early!
Both of my pregnancies were complete opposites in about 100 different ways. With my first, I tested + for GBS (isn't that what it is called...can't remember) and was borderline for gestational diabetes and was anemic, etc. Heartburn was extremely unbearable and I had migraines but no morning sickness. With my 2nd, I had the morning sickness but tested negative for GBS and gestational diabetes and was told I was super healthy that time around. Just more proof that ALL pregnancies are different so yours could be extremely different from what all you are reading on here.
My advice would be not to stress about how much you gain or don't gain. Eat healthy and don't worry about the weight. I promise you your body knows what to do and will do it. If you stress about it or try to force weight gain or loss, it could backfire.