So, we rescued a dog 1.5 years ago.
Not a puppy, aged 3.
The first few nights he howled and cried. We had a stairgate on the stairs, and he just wnated to be where we were upstairs.
He eventually stopped, but I found out in the morning that he had jumped the stairgate and slept outside ds door.
The next night I removed the stairgate, and he slept outside our bedroom door.
From my point of view, we have a cat, who slept in our room, so our room wasn't an option, but I really wanted him to learn to sleep downstairs.
Night 3 he slept on ds bed!
But after a few weeks, I would find him back downstairs on his bed in the morning. When we were due to go away and he was going to stay at my friends, I insisted ds shut his door, and he slept fine downstairs on his bed.
My point is, he need to learn to trust us and feel safe and not be anxious, and also learn where his space was. Once he was settled, it was fine to leave him in his own bed, but until it was his bed to HIM, he just felt abandoned.
I really really would not be locking him in a crate overnight, you need to crate train him first, then the crate is a safe place that he chooses to go to, and being in there feels safe, not scary.