@thephd in my experience the simplest solution on macos is just to use rbenv always
but yes, macos installs a number of programming languages that they really shouldn't for legacy reasons to keep people's old workflows from unexpectedly breaking on a new OS upgrade
used to also ship with python 2.7, but they finally managed to drop that one after many years of deprecation notices