Rating can only be stored in the file itself for certain file types that support it (and that Opus knows about).
For all other file types, Rating is stored via NTFS ADS metadata. This can be lost if:
Software edits the file in a way which does not preserve NTFS ADS metadata.
Software copies or moves the files in a way which does not preserve NTFS ADS metdata. (This can include Opus, depending on how it is configured under Preferences / File Operations / Copy Attributes.)
The files are archived. (Most archive formats like Zip, and almost all software for handling archives, do not have the facility to preserve NTFS ADS. Most file-based backup tools do not backup the data either, but ones which do a full disk-image backup will include it.)
The files are moved to non-NTFS storage, such as most USB sticks, FTP sites, and most non-Windows NAS devices.
You can use Tools > Print / Export Folder Listing to create a csv file listing the ratings of files below the current folder, if you want a way to backup that data specifically. For example:
New Folder,,,Today 10:07:04,,*****
New Text Document.txt,0 bytes,,Today 10:06:43,,****
New Text Document (2).txt,0 bytes,,Today 10:06:43,,***
New Text Document (3).txt,0 bytes,,Today 10:06:44,,**
(In a real example, you would probably want to add the Path or Full Path columns, so the csv file had full details about each file and could be used by a script, or similar, to re-apply the ratings if needed.)