7z files are containers that can hold any file type, including executables, documents, or scripts. Security Considerations for Unknown Archives
Upload the file to VirusTotal to have it checked against over 70 different antivirus engines.
If you must investigate, only open the file inside a secure, isolated environment like Any.Run or a dedicated Virtual Machine.
Verify where the file came from. If the origin is a random download link or an unknown sender, delete it immediately.