On most phones, the feature will be enabled by default. To check its status from the Phone app: Tap the three dots (top right ...
From Settings on your iPhone: Tap Apps > Phone > Silence Unknown Callers. Toggle on Silence Unknown Callers.