This happens when the .scrivx is separated from the rest of the project – which only happens on the Windows platform, since it can’t happen on a Mac or iOS. If you try to open the .scrivx without the rest of the project, of course it won’t work. A common cause is a person trying to restore from a zip backup who doesn’t know how to do that. Another cause is trying to move the project somewhere, but you decide to move the .scrivx instead of the .scriv folder. The project is a folder, not a single file.
I understand what you are saying, but the problem is occurring while creating a project. Whenever I create a project from a template, it fails to create the Settings, Data, or File folders that should be there by default in a project folder. And then this error pops up.
Sometimes AV software doesn’t play well with Scrivener and stops it from creating new files, so one thing to temporarily try is disabling your anti-virus. Then if the problem stops, whitelist Scrivener in your AV.