How do I find a supervisor for PhD studies?
The difference between "spamming", which you should not do, and a completely acceptable contact is how targeted your emails are. Make sure you know what you want and what the professor you are contacting does their research in, and that these two things align. Explain in your first email why you want to work with that specific person, what your background is, maybe also include your university transcripts. You do not need to know the professor personally before contacting them.