Latest Mac’s build in hardware test
Historically there was an Apple hardware test that you could boot to check if your Mac’s hardware is all good.
It came to a surprise though, that with newer Macs simply holding the ‘d’ during power on it runs some simple hardware diagnostic, too.
One should probably more often read Apple’s support pages, ..