Instead of creating a long list of all packages that are required to setup, run and visualize the results of the model, use the renv package that creates a reproducible environment for the whole RStudio's project
This guide takes you through the process: https://www.appsilon.com/post/renv-how-to-manage-dependencies-in-r
Relevant update: needs to update the documentation that we are now using renv