How did you restore the database, with T-SQL command or through SSMS? This error is likely to occur when network is unstable. But in your case it looks you’re restoring a local database to the same server from a local backup. Have you checked the path and the “replace” option? If you used SSMS, please post your input in the restore dialogue window.
In my case it was restore path issue. The folder I mentioned had not existed (had space in name I mentioned)