The most obvious influencing factor here is, of course, the product that you offer. If you are building a startup with the intentionof selling it later on, then you should consider this from the get-go.
Product selection heavily influences the creation and organization of an exit strategy for the business you will be doing because it helps you define ahead of time who your potential buyers will be.
In general, with a project of any size, you will need at least a year and a half to get some kind of tangible understanding of your product-market fit. From that point, you can start planning an exit strategy.