A technique I’ve used many years with brand new machines (both Windows & macOS) – as soon as they’re out of the box, boot with Clonezilla and make a full disk image.
Then, if there is a problem, I reverse the process to restore the machine to factory-fresh, out-of-the-box status.
(But I will add that I’ve rarely had to use the images.)