I had this issue myself with a 3080 graphics card that drove me up the wall for quite a while - constant crashes in anything remotely taxing. After a LOT of trial and error, it turned out to be an issue with the card itself not being able to put up with the power it was trying to draw - which is a known defect with some early model 30-series Nvidia cards.
Sometimes it would lead to a DirectX crash, other times it would cause the system to black-screen and force me to give it a hard reboot.
The solution for me was to undervolt the card, which lets it draw less power. That means the chip on the card will run a little slower, but in exchange it can sometimes actually gain frames per second due to running a bit cooler.
The guide I followed was here:
https://www.youtube.com/watch?v=KPR06CxysMw
...and it worked wonders for my card's stability.
One thing to note - if you do this and keep the undervolted settings, any time you update your graphics drivers and then immediately play a game the error will return until you reboot.
The other thing to note - if this IS the issue with your card, it means your card is actually defective, so sending it in under warranty to have it replaced should be an option and might be preferable.