How do people go to sleep when your newborn is sleeping lol

This sounds stupid but I’m a first time mom and my baby is a week old. Every since she’s been born me and my husband take shifts on watching her at all times..we don’t get to sleep at the same time anymore. Pretty much I’ll sleep during the day and he sleeps at night. We had a bassinet and she rolled into her side into the side of the bassinet and like almost suffocated herself. Now I will not put her back in that ever. So I ordered a co sleeper that connects to the side of the bed and tonight is my first night trying to use it. She sleeps great for like 2-3 hours at a time , eats, gets changed and goes back to sleep. The problem is I can not sleep . I worry so much about her rolling on her side again or choking on spit up. She spits up constantly. Idk how to feel better about this I know it’s not healthy that I’m barely sleeping.