I am a hexblade warlock wearing armor and a shield which gives me an ac of 18. If I'm hit and cast the shield spell would that stack with the +2 protection from my shield and give me an ac of 23 or do they not stack and my ac would be 21?
Your AC would be 23. The shield (spell) works fine with a shield (equipment).
However, if your hexblade warlock is also holding a weapon at the same time as the shield then they can't cast the shield spell unless they have the Warcaster feat. Shield is a spell with only V,S components and to cast it you either need a free hand or the Warcaster feat to allow you to cast spells with your hands full.
Here's the problem you actually have... Shield has Somatic components but not material, so technically you need one free hand to cast it. So if you're holding a sword and shield you can't cast Shield. To be fair, most DM's aren't quite so pedantic about that rule, but it's something to consider if your DM is a huge stickler for the rules.
I am a hexblade warlock wearing armor and a shield which gives me an ac of 18. If I'm hit and cast the shield spell would that stack with the +2 protection from my shield and give me an ac of 23 or do they not stack and my ac would be 21?
it should stack.
Shield (spell) and shield(equipment) is in my opinion, no different than wearing armour and casting shield.
It is not two types of magic stacking, or wearing two shields (equipment) so it's different kinds of AC and therefore stackable.
Your AC would be 23. The shield (spell) works fine with a shield (equipment).
However, if your hexblade warlock is also holding a weapon at the same time as the shield then they can't cast the shield spell unless they have the Warcaster feat. Shield is a spell with only V,S components and to cast it you either need a free hand or the Warcaster feat to allow you to cast spells with your hands full.
Here's the problem you actually have... Shield has Somatic components but not material, so technically you need one free hand to cast it. So if you're holding a sword and shield you can't cast Shield. To be fair, most DM's aren't quite so pedantic about that rule, but it's something to consider if your DM is a huge stickler for the rules.
Watch Crits for Breakfast, an adults-only RP-Heavy Roll20 Livestream at twitch.tv/afterdisbooty
And now you too can play with the amazing art and assets we use in Roll20 for our campaign at Hazel's Emporium
So since I have an animated shield I should be okay unless I'm surprised and don't have the opportunity to activate it.
Right.