It wouldn’t have to be communism. We could do it in the US today without changing capital ownership. The government would just have a lot less money to spend on anything else (how much this would be is up for debate).
I commented this the other day, but we literally already do this in small ways, social security being the most obvious example.
And it’s not as if society is going to stop functioning if we give people basic nutrition and four walls. Probably the opposite - our current system crushes people into poverty and keeps them there. I think people don’t understand just how hard it is to be poor. Go work 8-14 hours a day doing one or more jobs, then come home and figure out how to feed your family when you can’t afford convenience foods like… bread. Because $0.50 of flour and such vs $1.99 of sliced bread literally matters to you. And then you’re supposed to figure out how to learn something else in your off time, which is the 6ish hours you also need to sleep.
If we gave everyone housing and UBI, would there be some people that absolutely did nothing else? Sure. Would there be others that finally have enough physical and mental capacity to do something amazing? Abso-fucking-lutely. See also, the story of the vast majority of wealthy people.