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 28 USA and earlier • macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB