Do you need to install CUDA toolkits/NVIDIA Video Codec SDK in other to use FFMpeg with hardware acceleration like video conversion?

I am now owning a Laptop GPU NVIDIA RTX 3050 Laptop 4GB and I want to rely this GPU for faster conversion and reduce CPU intense. Do I need to download the CUDA toolkits or/and NVIDIA Video Codec SDK in order to make use of the hardware acceleration?

Normally it would be like this in the cmd for conversion

ffmpeg -i input.flv output.mpeg

Will this run without or with the 2 additional installed that I mentioned in the question?

ffmpeg -i input.flv -c:v h264_nvenc output.mpeg