You have write permissions issues, this is not related to R or RStudio but to your Windows configuration, but also, even if you solve the write permissions issue, you are going to find even more issues down the road if you set your package library in a cloud synced folder (OneDrive), so I recommend you to yo set your package library somewhere else (the system level package library is my preferred choice for personal use on Windows).
You can change the default library folder by setting your R_LIBS_SITE environmental variable on a .Reviron or .Rprofile file. For example:
# In a .Renviron file you can set it by adding a line like this one with the desired location
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.1\\library"
For a more detailed explanation, you can read this blog post