You ought state your jurisdiction, as we can't answer if you don't. I'll dilate on Dale M's comment that's alluding to the Contracts (Rights of Third Parties) Act 1999. I'll quote England textbooks that present it better than I can.
Richard and Damian Taylor. Contract Law Directions (2019 7 ed). p 82.
Poole, Shaw-Mellors. Contract Law Concentrate (4 ed 2019). p 82.