Say you move out of an enemy's range, and they opportunity attack you. Can you then cast Shield as a reaction, or do another reaction when that happens?
The rules for reactions are fairly straightforward:
Certain special abilities, spells, and situations allow you to take a special action called a reaction. A reaction is an instant response to a trigger of some kind, which can occur on your turn or on someone else's. The opportunity attack, described later in this section, is the most common type of reaction.
When you take a reaction, you can't take another one until the start of your next turn. If the reaction interrupts another creature's turn, that creature can continue its turn right after the reaction.
It specifically mentions being able to use reactions on your turn, so then we look to the shield spell, to see when the reaction is allowed:
Casting Time: 1 reaction, which you take when you are hit by an attack or targeted by the magic missile spell
So yes, you would be able to use this when you are hit by an opportunity attack, as that is an attack. You would then be unable to use any more reactions until the start of your next turn.
Yes you can, provided you haven't already used your reaction that round.