start now.
Just moved into our house two days ago. Are you doing custom? If you are, just know you will be doing a TON of work. We thought we had realistic expectations going into it but it was way more work than we thought. You have to choose literally every little detail and it seems never-ending.
As for shortages, make sure you make your big selections early (flooring, trim, lighting, appliances, fireplace, etc.) to avoid issues. And make sure when selecting a contractor you ask how long it has been taking to finish homes. We got a fantastic contractor, and we were only over our original estimate by two weeks. That is unheard of in today's market. But he is good. When one sub couldn't do something, he'd either yell at them till they'd do it or he would be on the phone all day finding someone who could. Makes good business sense for him because he's paid based on completed work.