There are three options here with multi-family new construction.
1) Townhomes are Vertical Construction with the land under each residence being sold with each unit. Fire rating is between units running vertically. Building code is usually residential. This could be a build and sell or build and hold, with the possibility to sell individual units at any point in time.
2) Condos are Horizontal Stacked Construction. The land is owned by the condo association. Fire rating is horizontal and vertical between all units. You have to meet Commercial code, ADA units, fire sprinklers, elevators (maybe), walkways, exterior stairways, etc. It is more difficult for buyers to get loans. High risk of lawyers buying a unit, tearing it apart, finding one thing not to code, getting the rest of the condo owners to sign on to a class action lawsuit and hood every subcontractor, builder, architect hostage for an insurance settlement. This would be a build and sell scenario.
3) Apartments are Horizontal Stacked Construction. The land is owned by the owner as well as all units. Fire rating is horizontal and vertical between all units. You have to meet Commercial code, ADA units, fire sprinklers, elevators (maybe), walkways, exterior stairways, etc. If you can build it 3-stories without elevators and minimal fire sprinklers you will minimize costs. If you can’t, then try to go 5-story and get more density of units. 4-story usually incurs all of the additional cost for commercial code without the additional income from higher density. Obviously this would be a build and hold scenario.