The 390 driver is out of support and won’t compile against kernel 6.5 but the correct driver for your gpu is 470 anyway.
If you have issues with that one, please see this:
https://forums.developer.nvidia.com/t/driver-install-fails-with-the-error-an-error-occurred-while-performing-the-step-building-kernel-modules-see-var-log-nvidia-installer-log/280385/2?u=generix