Can you run code in an R sessions started from a command prompt (not involving RStudio)? If yes, maybe try resetting RStudio's state. If no, the problem is likely with R and not RStudio.
R seems to be working okay.
I tried to reset RStudio's state. I'm no longer getting "fatal error" but it is still aborting the session even when I install a package.
Are you on the current version of RStudio (2024.09.1 Build 394)? If no, I would suggest upgrading. If yes, try updating xfun from an R session (install.packages("xfun")) and see if that fixes it.