If a stranger messages you, you decide first.
A message from someone who isn't in your contacts goes to the “Requests” folder. There, you can see their registration date, mutual groups, and advice: accept, block, or report. Until you accept, they can't send you files or images.
Chats → “Requests”
Open the conversation and view the information
Accept or block