How to set file system as read-only?

i’m using Manjaro 21.12-vim3 linux on ARM cpu board and would like to protect my sd card from random shutdowns by setting an overlay root , but no luck for now
i tested liveroot , but newly created files are still there after a reboot
also i tried editing /etc/fstab , and root become read only . but system halt due to inability to write back to root
and i tested this example with no results
mount -t overlay overlay -o lowerdir=/home,upperdir=/tmp/up,workdir=/tmp/work /tmp/merged

is there way to move write operations to ram ?

Then try to set the filesystem to read only with grub command line.

Move root to ram.