The downloaded source packages are in
'C:\Users\janha\AppData\Local\Temp\Rtmp4aMmFl\downloaded_packages'
<U+2714> Package 'stringi' successfully installed.
Warning message:
In utils::install.packages("stringi", repos = "https://cran.rstudio.com/") :
installation of package 'stringi' had non-zero exit statusuestions about R Markdown here.
This seems to be a problem with RTools, either install the binary version of the package or verify that you have the proper RTools version for your R version.
Also, setting your package library in a cloud synced folder (OneDrive in your case) brings installation problems very often so I recommend you to set 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 like this with the desired path.
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.0\\library"
For a more detailed explanation, you can read this blog post
Also...
Why install.packages in an Rmd ? I find this often when people cut and paste a solution from the internet. Packages only usually need installed once. Then just load them with library/require