There are enough good manuals on howto install R4 on Ubuntu20, my favorite one is https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-20-04-de (in German).
However, if you then install packages, you will likely get failures due to missing libraries.
So what you definitely have to do is
sudo apt install libcurl4-openssl-dev
sudo apt install libssl-dev
You may also need extra libraries: e.g. for the package imputeTS, which in turn depends on XML2
sudo apt-get install libxml2-dev