Start with the equipment you expect to have and then leave room for the movements you want to perform and room to walk around the gear. Someone who wants to do farmers carries and battle rope work will need a lot more space than the guy who has a kettlebell and a chin up bar.
A standard home basement with 8 foot walls gives about 7 feet of height floor to joist. Nine (9) foot will provide about 100 inches. Some gym equipment like functional columns and lat pulldown machines exceed 100".
Remember if you are want to press overhead or do pull/chin ups, you need sufficient ceiling height. Figure out what movements you want to do and what equipment you want in your gym. Then talk to your builder to ensure you have enough finished height to work with.
Others: Lighting and mirrors should be planned early.
Plan for storage. Your equipment will multiply and you’ll need a place to put it.
A mistake folks make is thinking the dimension of the equipment is what is needed. Remember that a power cage might be 4 x 4 foot wide but the barbell is close to seven feet long. Then add space to load the bar and put a bench and a human in the cage to lift and you need 8x8 or more just for that station. If you use your power cage as the TRX anchor will need room to do the TRX work. etc etc
Planning ahead, drawing things out and playing with configurations is a good way to start.
Have fun !!