R and RStudio at some extent have problems with cloud synced folders, I would recommend setting your package library in a non synced folder.
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 similar to this one, with your desired folder path
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.0\\library"
For a more detailed explanation, you can read this blog post