If you receive harassment or spam via a private message, make sure to report the user who has been contacting you.
You can report them by opening their profile page and clicking on the flag icon at the top right corner of the page. When you submit your report, make sure to put it under the 'Spam' category.