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 current memory limit for the free tier), 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 with this command:
remotes::install_version("package_name", version = "x.x.x", repos = 'https://packagemanager.rstudio.com/all/__linux__/focal/latest')