Hi @Sam45
Yes there are many choices of this type of wall called retaining walls. Its worth searching "retaining wall design" and go to images.
You will see there are many designs. You may also see solid brick walls that get wider the deeper they go...
Designs that allow for drainage either through weep holes or drainage to foundations or back filled with drainage material depending on the soil type, slope and existing drainage ground water levels and so on are also indicated.
As you say the wall needs to be attached to the base, however, again, there are many choices but basically, depending on the design the bigger the heel or toe of the foundations the less chance of failure.
Whilst the mix of views may seem confusing, the answer, as always is in the maths and someone competent to calculate it and come up with the design that will achieve it.
@Mr Punter, @Conor, @ProDave, @Redbeard and @Iceverge have all come up with good information.
I wonder when the neighbours paving was completed and if the sloping land was levelled at the time bringing the earth higher on the failed wall. Any builder would know that the wall without backing would fail....
Best of Luck
Marvin