I don't know if anyone will see this, but I got an error message in R studio and it gave me a link to this issue here. I was able to solve it by:
going into my terminal ->
running | brew cleanup (brew install --cask xquartz | will work as well since it runs the cleanup if it notices you haven't updated in a certain amount of time) ->
Pressing command & space to bring up the search bar, look for the xquartz app and click to run it in the background.
TLDR: For some reason, idk why, I have to manually open the xquartz app and have it running in the background as an app to use rgl. Install it/restart it with homebrew. Hope this helps!