If it is already mentioned in your job contract that you will be allotted company's apartment then you don't have to worry about searching for one. In this case, you will save a lot of time and the ha...ssle involved in looking for an apartment.
Anyways, you will be supported and guided by your company as there are still a lot of formalities which are mandatory for any foreigner and can be time consuming (For eg. registering your address in the nearest city ward office「区役所(kuyakushou)、市役所(shiyakushou)」, buying a sim or a phone that can be used in Japan, basic necessities, furniture, etc.)
So, planning to enter Japan a week prior the joining date is recommended.
・On the other hand, If you are not to be allotted the company's apartment then things can turn out to be a little challenging for you.
-You will need to find a real estate agent「不動産屋 = fudousan-ya 」to rent an apartment in Japan. Most agents do not speak English and also do not take inquiries or applications from outside Japan.
-Application process usually takes about ten days to two weeks from the time you find an apartment to the time you can move in, assuming that your application is approved.
If this is the case then ideal period to enter Japan is recommended to be at least 2 weeks prior joining date.
Lastly, if I can suggest one thing to you that would be to discuss about this query directly to your company's member who's in charge of your coming to Japan.
I hope this was helpful!
Thanks