Slavery effectively disappeared in most of Christian Europe towards the end of the Middle Ages, because the Church opposed keeping Christian slaves. (Similarly, Islamic Europe had banned Muslim slaves.) As Christianity spread, slaves were no longer conveniently available, and the society had to adapt.
In densely populated areas, that meant systems like serfdom. Agricultural land was a scarce resource mostly owned by the elite. Most peasants were nominally free but tied to the land, with obligations towards whoever owned the land. Peasants farmed land owned by the local lord and paid rent with labor. And if the lord sold the land, the peasants and their obligations went with it.
In densely populated areas, that meant systems like serfdom. Agricultural land was a scarce resource mostly owned by the elite. Most peasants were nominally free but tied to the land, with obligations towards whoever owned the land. Peasants farmed land owned by the local lord and paid rent with labor. And if the lord sold the land, the peasants and their obligations went with it.