I have a Ubuntu 22.04 system.
I used advice from here to install version of R 4.0.0 but I always get 4.2.1 the newest one.
Problem installing R 4.0 on Ubuntu 18.04
One thing I changed is "bionic" to "jammy" since I have 22.04 instead of 18.04 of Ubuntu so the command adding the repo looks like this
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/'
I used the following command after
sudo apt-get update
sudo apt install r-base
I run the "R" command in the terminal and see that there is 4.2.1 version installed.