You fucked up by buying Nvidia first off. But you have to use the open source drivers Nvidia doesn't officially fully support their newest cards on the closed source ones.
Should be a simple switch over and your good to go.
In the future never buy Nvidia if you are going to use their newest generation they always lag a full generation behind for proper support. It's absurd.
Your second fuck up is using Ubuntu. If you want to use the most recent generation of hardware your option is basically arch or get fucked over to some degree.
Ubuntu lags behind by sometimes over two years in hardware support. This is true of every Debian and Ubuntu based os. Mint and popos and some fedora distros have the same problem. Tho fedora tends to be far better with this. They just are all over the place with how fast they push things. So very case by case basis.
You basically need to be on bleeding edge kernel and packages for proper support.
This is the biggest reason gaming focused distros are all arch with the expections of bazzite which is at least based on fedora which also tends to push things really fast.
Simply put. You want nice hardware support for new harder? Pick arch and stick to AMD. Or at least go with fedora.
Stay away from Debian/Ubuntu/mint/popos. They are great till you want hardware support for anything newer then 1 to 2 years old depending on where in the release cycle you are.