Normally when stuff like this happens, it's either an issue with the original installation of the OS/software, or something that was added after purchase causing a conflict. I used to build PCs from scratch, but in recent years I've purchased from Dell. First thing I do with a Dell PC is wipe the hard drive and rebuild the system from scratch using the disks they provide (a few things (drivers, etc.) may need to be downloaded before the rebuild). They install so much junk to the system that I want it gone. It is usually better to start from scratch than to try and delete the unnecessary clutter.
While I have avoided reboot/lockup issues for quite some time, I don't recommend the above to anyone unless they are willing to live with the possibility of struggles during a rebuild.
My experience has been that Dell is fairly reliable as far as PC vendors go. I also like to wipe and reinstall the hard drive as I don’t trust the image that comes from the factory.
Also, if you are running Windows 10, Microsoft’s anti-virus/malware software “Defender” is already included. If you are a casual user, it is probably sufficient to hand your anti-virus needs.