Not very cheap, but it's a good tactic:
combine some pressure plates together with dispensers filled with arrows or snowballs.
That way, whenever mobs get near the hole, the dispenser will fire at the mob, hopefully pushing it into the hole.
gaming.stackexchange.com/users/1552/Denilson Sá Maia
They still seem to like to swim , so you could make some Water Traps - or any running water, maybe combined with a waterfall, into your pit.
gaming.stackexchange.com/users/2666/Cyclops
If you want to lure animals, you need to use their breeding mechanics.
If you want to lure sheep, cows, and mooshrooms, use wheat.
If you want to lure pigs, use carrots.
If you want to lure chickens, use wheat seeds.
However, luring wolves and ocelots, first you gotta tame them.
Taming wolves is easy, all you have to do you use some skeleton bones.
Taming ocelots is a bit harder, because the ocelot will run away if you move your head or body a lot, it will run away, setting it to F8 mode will help a little bit.
Then to lure wolves and ocelots, just simply walk once you've tamed them and they will follow you around and stuff like that.
NPC Villagers Villagers do not have a food item; they will breed of their own accord (and in their own time) depending on the available houses, or at least "registered doors".
The only possible way to lure villagers is to get a few zombies to chase them into holes, while doing this, you may end up getting a few zombies in the trap too.
gaming.stackexchange.com/users/46754/ThatHelpfulGuyYouLike
Snowballs will make mobs act as if they have been hurt but don't cause any damage (they still flash red) Not really luring more herding
gaming.stackexchange.com/users/4012/Ronan
Place three blocks on top of each other, then break the two blocks underneath the top one.
Place a wooden pressure plate underneath the floating block and place 4 wooden doors around the pressure plate, (each facing at a 90degree angle difference).
When a mob triggers the pressure plate, all doors will close and you then proceed to kill it through the windows.
gaming.stackexchange.com/users/65737/Magpie
If you are holding wheat in your hand any animal will follow you, so you could just walk into your hole and they will follow and you can use a ladder to get out.
gaming.stackexchange.com/users/28988/knee1
It seems to me like the last few updates made animals/mobs smarter: they won't fall that easily into holes 2+ blocks deep. Maybe I'm mistaken, maybe not...  Anyway, did anyone try to combine normal blocks and stone slabs to create an angle which would produce more "jumps" into hole traps? Is there a proven combination of blocks that gives good results?  Thank you.
What is a good way to lure animals / mobs into big holes/traps?
gaming.stackexchange.com
<minecraft-java-edition>
gaming.stackexchange.com/questions/15210
gaming.stackexchange.com/users/6377/pootzko
Try making water traps, combining pressure plates together with dispensers filled with arrows, or put some wheat in your hand so the animals follow. You can combine pressure plates with dispensers filled with arrows or snowballs. You could also make water traps if they seem like they like to swim. Another solution could be to place three blocks on top of each other and break two blocks under the top one. A handy solution to lure mops is to hold food in your hand.
Users suggest different tactics with which to lure mobs.