There is no such obligation in Islam. People should not necessarily live together with all of their relatives. Women can ask for a private house before marriage.
Bu it is also not forbidden to live with in-laws. If a woman asks for a private house and the issue is not discussed before marriage, then the husband’s economic situation and the reasons of the wife should be considered altogether. If the woman is reasonable, meaning there is a real need for moving into a private house and the husband has the financial possibility, then he has a responsibility to provide a separate house for his wife and children.