The snippet below bootstraps a minimal Rocky Linux root filesystem at "$HOME/path/to/rocky/root" while making it explicit that you do not need real root privileges on the host. It relies on Linux user namespaces so the process is mapped to root inside the namespace but runs as your unprivileged user on the host.
TARGET="$HOME/path/to/rocky/root"
# Create new userns / mount ns / pid ns and run the command inside (no real root required)
unshare --user --map-root-user --mount --pid --fork \
dnf -y --installroot="$TARGET" \