Truecaller can automatically identify spam / unwanted calls on your iPhone that other people have reported or blocked. This way you can simply ignore a call that Truecaller identifies as spam.
Please enable all switches for Truecaller in iPhone Settings > Phone > Call Blocking & Identification
If these switches are not visible, please check the troubleshooting steps here.