sure, here is some reference you can read about those two kinds of animation
Should You Use Root Motion? - YouTube
This docs below explain about your problem
Root Motion | Unreal Engine 4.27 Documentation
I hope learn something useful from these reference