Let us not forget that Mary and Joseph were homeless weren’t they? At the time of Jesus’ birth?
No they were not that is a myth pushed by open borders fans
The trite rhetoric that Jesus's human parents were poor, homeless migrants is unabridged fiction not worthy of repetition.
Joseph, husband of Mary, was a skilled tradesman, a carpenter, in the small city of Nazareth. That was their home. They trekked to Bethlehem because Big Government (Rome) ordered them to go there to pay Rome's taxes and report their residence and other personal information (the census) to Rome.
When they arrived at Bethlehem, all the inns were full of people who had gone there to comply with the government's edict. Joseph could afford a "hotel" room, but none were vacant. They were able to rent lodging in a stable, and Jesus was born in the stable. The stable might have been safer and more private than the inns. In those times inns were known for communal beds and for robbery and assault.