/var/spool/mail/root file was deleted by accident; I need to recover it.
Is there any link related to this file or how this file got updated which script responsible for it?
/var/spool/mail/root typically contains locally delivered email for the root user. For example,
echo hello, world | mail -s 'kandr test' root
If you don't have a backup then you have lost your local email for this user account. (If you didn't ever read it then consider it a safe loss.)
Don't try to recreate the file. It will be recreated automatically the next time the root user account receives a message. (You can read such messages with the