Enter Diagnostic Mode
Run Apple's built-in hardware diagnostics
Bottom lineApple Diagnostics is built into every Mac: shut down, then on Apple silicon hold the power button until Options appears and press Command-D; on Intel, press D right after power-on. Unplug everything except power first. Reference code ADP000 means no issues were found; any other code points to a hardware fault.
Shut Down
Completely shut down your MacBook
Start Diagnostics
【Apple silicon】Press and hold the power button until startup options appear, then press Command (⌘) + D 【Intel Mac】Turn on your Mac and immediately press and hold D. If that doesn't work, try Option (⌥) + D
Choose Language or Test Set
Follow the onscreen prompts. Depending on macOS version, Apple Diagnostics may ask you to choose a language or select which checks to run
Review Results
Note any reference codes (for example, ADP000 = no issues found). Then restart or shut down from the onscreen options
Note: Disconnect all external devices except keyboard, mouse, display, Ethernet connection (if applicable), and power adapter before running diagnostics.