Macbook 16 turning off and on display rarely
For any power related issues with a Mac I would recommend you try one time an SMC reset: https://support.apple.com/en-us/HT201295. As Apple puts it: “Resetting the system management controller (SMC) can resolve certain issues related to power, battery, and other features.”

If that procedure doesn’t fix your issue you might want to have Apple technicians run deeper tests on your hardware by booking a service appointment.