Nadhīr means one who warns. The Messenger ﷺ warns people of the consequences of evil deeds in order to save them from Hell.
The purpose of warning is not merely to create fear. It is to encourage people to leave what has been prohibited.
Warning thus corresponds to the prohibitions: knowing the danger of wrongdoing should lead to avoiding it.