It largely depends on if you can afford to have a room dedicated as your home office.
Working/relaxing cannot happen in the same space. Our brains are not wired to do such a dramatic difference in mental activity in the same location. That's also why bedrooms should be used for sleeping and fucking ONLY. Once you start reading/scrolling in bed, your brain makes that connection, "Oh, I'm in bed, I should doomscroll for the next 3 hours" instead of "Oh, I'm in bed. I should sleep."