Spawn enemy by a certain reached score

I’m trying to spawn an enemy(continuos spawning I have a public interval) when the player reaches a certain score
I didn’t find a topic on this subject

if(score == targetScore)

Instantiate(enemy);