Apple Diagnostics
https://support.apple.com/en-au/HT202731 are a fairly basic test of the hardware. If you suspect a hardware problem, Apple diagnostics provide a simple to use test. Any errors found will be helpful for getting things fixed.
But a clear run does not guarantee healthy system as they are not extensive or rigorous tests. For example, intermittent RAM problems are unlikely to be detected and require longer running tests.
Worth the trouble? Yes, if you are having problems. But not otherwise.