Issues starting MongoDB on MacOS

On Macos access to root folder is removed.Thats why you get read only filesystem message
There is a difference between /data/db and ~/data/db

Your first command was correct.It says dir exists
Your data/db exists under your home dir
So include the full path in your config file

When you run just mongod without any params it starts mongod on default port and default dirpath /data/db.Since no access to /data/db(read only) it failed to start