On windows:
On installation you can see
** byte-compile and prepare package for lazy loading
Warning in lazyLoadDBinsertValue(data, datafile, ascii, compress, envhook) :
'package:stats' may not be available when loading
sessionInfo()
R version 4.4.0 (2024-04-24 ucrt) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64
Similar thread on Stack Overflow suggests it's an RStudio bug, that supposed to be fixed 4 years ago
https://stackoverflow.com/questions/27623901/r-warning-packagestats-may-not-be-available-when-loading