Hi,
see extensive information in this post on Wefugee: ****://bit.ly/29LVv82
Informations are in German, but the provided links may give you constructive hints.
Briefly: You won't run into serious trouble if you offer a room to someone, who is in an emergency situation. If you want to rent a room for a longer time, see details on FOCUS online ****://bit.ly/29LWEMX (German text, use Google translate).
Regards, Jan