If the freezing is random, then the most possible source is overheating. Replace the fans, remove unnecessary wires, rethink the air flow, install additional fans in the case (if not a laptop). If the freezing is predictable, the most possible source is the conductor. Replace the driver, install the old driver, rewrite the driver (try).
If you don’t fix this, replace motherboard, then check. Replace the operating system, test.
If nothing helps, it is recommended to check the capacitors on the GPU card, these are the only elements that can be replaced DIY-style with reasonable soldering capabilities (and are vulnerable).
It may be a software (driver, motherboard, video card, virus) if it happens while playing some game, it may be too old or due to too inadequate and weak power supply.
Try to remove the software from the video card, in the control panel, programs and features, and install a version of the software at the time of production / release year of the original, this software is usually found on the video card’s website in the Media / drivers.
Try another video card.
Reinstall the graphics drivers.
All kinds of graphics card problems, specifically freezing, crashes and graphics failures can be caused by bad drivers. This is especially common on older graphics cards that no longer receive driver updates (for example, the Nvidia 700 series and earlier, AMD R9 and earlier versions). In this situation, reverting to an older driver can sometimes help, but (unfortunately) the only real solution is to get a newer GPU with the right software support.
If the problems persist, consult a monitoring tool to see if it is overheating or if some of its parameters are incorrect (for example, if it consumes too much energy and activates the OCP). Try to reset it to the default settings, if any of the settings have been changed. In case of overheating, you can try to increase the fan speed, improve the ventilation of your case or possibly slightly reduce the working time and speed of the GPU or its RAM.
Physically control the GPU: is it completely inserted into the PCIe slot, are there power cables firmly connected and are your fans running freely?