Let's focus on immediate practicalities.
You need to have an STI test, just to be safe. Trust, but verify. Then you need to ensure you only ever have protected sex with him, unless and until he gets checked himself, and shows you clean results. You'll have to repeat the tests after a certain interval too, as some diseases won't show up right away.
So you need to have a conversation with him about sexual exposure, honesty, and whether he has in fact endangered your health. This is a good opportunity to gauge his integrity and responsibility versus deflection and gaslighting.
Even if this unknown person is making things up, you still need to pull together as a team in response, protect yourselves and each other, and get the tests done. You to be safe, him to reassure you. You should both understand that.
Irrespective of whether or not you believe him.