Based on the symptoms you described, it's possible that your MacBook Pro is experiencing a hardware issue. Here are a few possible causes and solutions:
1. Overheating: If your MacBook Pro is overheating, it may freeze and shut down to protect itself. Make sure that the air vents on the side and back of the MacBook Pro are not blocked and that the fan is working properly. You may also want to consider using a cooling pad.
2. Failing hard drive: A failing hard drive can cause freezes and shutdowns. You can use the built-in Disk Utility to check the health of your hard drive. If it is failing, you may need to replace it.
3. Corrupted software: A corrupted system file or application can cause freezes and shutdowns. Try reinstalling the Big Sur OS or running a clean install of the operating system to see if it resolves the issue.
4. Faulty RAM: Faulty RAM can cause freezes and shutdowns. Try running the Apple Hardware Test to check the health of your RAM. If it is faulty, you may need to replace it.
5. Logic board issue: A logic board issue can cause freezes and shutdowns. If none of the above solutions work, it's possible that your MacBook Pro has a logic board issue. You may need to take it to an authorized Apple service provider for repair.
Further, it's always recommended to backing up your important files and data as soon as possible in case of any potential data loss during troubleshooting or repairs.