Ricky at Two But da Vinci takes you on a tour of a house build for solar. In this specific example, what is being installed is a Tesla Solar Roof but most of the points he makes apply to any PV solar installation.
The executive summary is basically to built a shed roof (that is, it tilts in only one direction) that is in the right slope and direction for optimized solar. Having done solar retrofits I 100% understand this.
You can check out this video and the decisions made by the homeowner.