You can use Contact Key Verification to receive automatic alerts that help verify you're communicating only with the people you intend.
Start by opening the Settings app on your iPhone.
1
Tap on your Apple ID, which is represented by your name and picture, located near the top of the screen.
2
Scroll down and find 'Contact Key Verification' near the bottom of the menu.
3
Tap on 'Verification in iMessage' and toggle the switch to enable Contact Key Verification.
4
Congratulations! You've successfully enabled Contact Key Verification in iMessage
5