I checked the link hcsitas provided, and couldn't help but notice that no mention was made in their Mac requirements of the last two MacOS versions (Ventura and Sonoma). I'd want to verify with them that a new Mac with Sonoma will be fine with R-Studio.
I would modify my recommendation just a tad, and eliminate the need for 24GB RAM, but would still suggest 16GB. Although I respect that everyone has their own opinions, I still feel 16GB RAM should be the "base" model.
The ports? Well, only the OP would know how many devices will be connected, so I really can't say on that.
Internal storage? Again...that depends. If they're to be stored on an external drive, then a 1TB SSD probably isn't needed. (But I'd still suggest that 512GB SSD should be the "base" model.
If a Mac's RAM and/or internal SSD could be upgraded later, my recommendation might well change. But they can't, unfortunately.
LOL...so SarahRO...have we thoroughly confused you now?