Do you get an error running ggplot2 code in the R GUI instead of RStudio?
Which build of R 4.1 did you install, the one for Big Sur (arm64) or the one for High Sierra or higher (x86_64)? The first is only for M1 models, while the latter works on both M1 (with Rosetta 2) and Intel machines.
Have you tried R 4.1.1?
I may not be of much help, as my current iMac and MacBook Air are from 2020, pre-M1. Having lived through two other mac processor changes (Motorola 68k to PowerPC and then PowerPC to Intel), I decided to wait a year or two for an M2.