In projects using renv, the repositories used in a project are normally encoded into the project lockfile, at renv.lock. If this file exists, renv will read it and use it to set the active repositories for the project, and this will generally override any other configured repositories. In short, renv.lock becomes the "source of truth", and other settings are generally ignored.
If you need to update the lockfile stored in the renv lockfile, you can run:
options(repos = <...>)
renv::snapshot()
Or, you can manually edit the lockfile itself -- it's just JSON after all.
If you'd like to override the repositories used by renv during restore, you can set:
RENV_CONFIG_REPOS_OVERRIDE = https://packagemanager.rstudio.com/cran/latest
as an environment variable in the appropriate place. This will override the repositories encoded in the renv lockfile.