Which versions of CUDA, OpenCV, cuDNN etc.? What does your CMake configuration output look like? Are you building from the command line, if so what are your CMake arguments?
Did OpenCV build correctly, have you tested it? See Verifying OpenCV is CUDA Accelerated.
When do you get this error, when installing with pip?
Have you tried using a fresh install of miniforge to eliminate existing python conflicts?