Go Prone to Avoid Cavalry
Cavalry riders can be a bit difficult to deal with in Battlefield 1, as they have the advantage of increased health, height, and mobility. To avoid getting sliced by an ambitious horseback rider on the battlefield, all you have to do is hit the deck. Cavalry riders can cut you down when you are standing or crouching, but their sword can’t reach you on horseback while you’re lying prone.
You probably can’t shoot them very easily while lying on the ground, but this will help prevent you from getting cut down when you see the cavalry running towards you. If you do end up shooting at the cavalry, make sure to shoot at the player and not the horse, as the horse has higher HP and will be much more difficult to gun down.