cuDNN is required together with CUDA and NVIDIA drivers when running deep learning and machine learning programs using Tensorflow on NVIDIA GPUs. Below are the installation methods for cuDNN on Windows 10 and Ubuntu.
cuDNN can be downloaded from the following.
NVIDIA cuDNN | NVIDIA Developer
Login and participation in the developer program are required for download. While itโs a bit time-consuming, this step cannot be skipped when downloading from the official site, so you have to do it.
If you want to download and install a previous version of cuDNN, use the following archive. For example, if TensorFlow supports CUDA 11.0 and you want to install 11.0.
cuDNN Archive | NVIDIA Developer

For Ubuntu, download the Linux/Ubuntu package following the above steps, and download the .deb file format package file.
Install this with sudo dpkg -i <library_name>.deb, and installation is complete.
(Reference)
Installation Guide :: NVIDIA Deep Learning cuDNN Documentation nvidia - How can I install CuDNN on Ubuntu 16.04? - Ask Ubuntu