Here is how to do the same thing on Windows and Linux for those interested.
Windows
"canPlayMinecraft": true,"ownsMinecraft": true},"type": "Offline"}],"formatVersion": 3} > %appdata%/PrismLauncher/accounts.json
Linux
echo '{"accounts": [{"entitlement": {"canPlayMinecraft": true,"ownsMinecraft": true},"type": "Offline"}],"formatVersion": 3}' > ~/.local/share/PrismLauncher/accounts.json
Flatpak
echo '{"accounts": [{"entitlement": {"canPlayMinecraft": true,"ownsMinecraft": true},"type": "Offline"}],"formatVersion": 3}' > ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/accounts.json
It's also possible to download the accounts.json file and transfer it into the directory. By the looks of it on MacOS the directory is $HOME/Library/Application Support/PrismLauncher/.
Edit: If you are using the portable Windows version you can place the accounts.json file in the root directory of the install.