Help inject new configuration before reboot using the command ostree admin --sysroot=/target --print-current-dir

According to the Bootc documentation, the following example can be used to inject new documentation.

# Get the deployment path
DEPLOY_PATH=$(ostree admin --sysroot=/target --print-current-dir)

# Add a systemd mount unit
cat > ${DEPLOY_PATH}/etc/systemd/system/data.mount <<EOF
[Unit]
Description=Data partition

[Mount]
What=UUID=...
Where=/data
Type=xfs

[Install]
WantedBy=local-fs.target
EOF

But how am I supposed to run it? If I use it as is, with the --sysroot=/target inside the container, it gives me the error: Read-only filesystem. On the host --sysroot=/ give me the path, but when I try to copy some config like mount in these example I receive the same read-only error.

My actual host is a fedora-bootc base with only a new user.

Could you try to explain what the ultimate goal is, i.e. what you are trying to achieve overall?