Ride Along allows villagers and smaller animals to ride larger animals. "Small" and "large" are calculated automatically based on hitbox size, and should work reasonably well for modded entities.
There are two methods to mount your entities!
1. While riding a mount that can carry more than one passenger (such as a boat), Ctrl + right click on the rider
2. Attach the mount to a lead, then Ctrl + right click on the rider
To dismount all passengers, simply Ctrl + right click on the mount.
By default the key to use is Left Control, but it's rebindable to whatever your heart desires.
If you are a mod author and want to adjust how much an entity can carry or how big a creature has to be to carry it, see Notes for mod authors
History
In Minecraft 1.15 and 1.16, this was a feature of Realistic Horse Genetics. Starting with Minecraft 1.17, Ride Along became its own, independent, mod.