I'm not getting the same/better quality in render as in the viewport.

I did. That didn’t help but I found a solution. I was going to put it here also.
It turned out that I had to replace the .dll file to be able to use Ray Tracing. Now the renderings are as they should be.

Thank you for your answer.

Here is the link: Solved : Cant Enable RayTracing in UE5 (gtx 1060)(Nvidia Pascal) - #130 by JohnDow