2 1/2 year old not easy to get to sleep

I am so stressed and worked up my child has always been great at naps and going to bed until around 20 months then over time it has just gotten worse. It’s affecting time I get with my husband bc I am up all night trying to get him to sleep I am

Pregnant with baby 2 at 20 weeks and need a solution I have tried everything even talked to his pediatrician it’s just getting worse... any suggestions or did anyone go through this and figure out why 😩