Many of your ros/gazebo community members already showed up here.
Problem: 18.04 kernel doesn’t support your ryzen 4xxx gpu so you will need to install a kernel manually:
You will need 4 packages
linux-headers-XX
linux-headers-XX-generic
linux-image-unsigned-XX-generic
linux-modules-XX-generic
from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10.79/
and remove the ‘nomodeset’ kernel parameter.
Though you might run into problems with the gcc version. If all runs well, you’ll have to tinker a bit with xorg config:
nvidia-xconfig doesnt do what i want it to, nor does nvidia-settings - NVIDIA Developer Forums