Example: https://wiki.archlinux.org/title/Firefox/Profile_on_RAM
I don't keep the profile in RAM, only the cache:
% grep cache /etc/fstab
tmpfs /home/nous/.cache/mozilla tmpfs noatime,nodev,nosuid,size=400M 0 0
tmpfs /home/nous/.cache/palemoon tmpfs noatime,nodev,nosuid,size=400M 0 0
tmpfs /home/nous/.cache/chromium tmpfs noatime,nodev,nosuid,size=400M 0 0
The nice thing is that RAM in tmpfs is only consumed when used.