A wall on sloping terrrains always should have segemts with horizontal foundation, otherwise it would beginn to slide "on the slope".
Just cutting it on the surface of a terrain should do the job just for "pictures" but not for real building-drawings..
When walls are to be built in reality, the foundation has always to be horiziontal in segments.
it should always do something liket this old "gdl" from me..
https://bimcomponents.com/GSM/Details/19877
AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia