I wonder if this OBS forum thread can help you?

https://obsproject.com/forum/threads/true-constant-quality-mode-for-h264_nvenc-and-hevc_nvenc.158363/

====
rc=constqp and cq=2
====

While how it work under the hood is question worth many threads ....

our profile is veeeery basic, but it worked for me on GT710, so I suggest to put more advanced settings into another, new profile...

mp4 h264_nvenc
# encode for nvidia graphics hw only
preset medium
profile main