When do I need to install a mezuzah? Who has this responsibility?

Outside of Israel, the mezuzah should be installed no later than the 30th day from the day of settlement in an apartment or in a house, and in Israel – from the moment of settlement. The reason for this difference is that the Land of Israel is considered a place intended for Jews, and settlement in other countries is initially considered temporary.
The establishment of the mezuzah has nothing to do with the celebration of the new settlement.
The obligation to install a mezuzah lies with the one who lives in the house or uses the premises, and not with the one who owns it, therefore, mezuzahs are also installed in rented premises. When building or repairing a house, mezuzahs are attached only after the doors are installed.