Generally, use a Solid Element Operation (boolean) to subtract the wall(s) from the roof(s) with upwards extrusion. The trimming is then dynamic.
For static trimming, thee is the Trim to Roof command.
See the user guide for example of each.
Karl
One of the forum moderators
AC 27 USA and earlier • macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB