This happens from time to time when a new package version is out, the reason is that the package requires more than 1GB of memory to compile (the default RStudio Cloud memory limit), the way RStudio Cloud addresses this issue is by caching precompiled binaries of the packages but it could take some time for the cache to update to the current package version.
Alternatively, you could try installing a previous version this way:
remotes::install_version("package_name", version = "x.x.x", repos = 'https://packagemanager.rstudio.com/cran/__linux__/xenial/latest') # For projects created with Ubuntu 20 change the repo to "focal" instead of "xenial".