You can't pass destination to generate-documentation, instead you can use xcodebuild:
PACKAGE_NAME=packageName
REPOSITORY_NAME=repoName
OUTPUT_PATH=./docs
DOCC_FLAGS="--allow-writing-to-directory $OUTPUT_PATH generate-documentation --target $PACKAGE_NAME --disable-indexing --transform-for-static-hosting --hosting-base-path $REPOSITORY_NAME --output-path $OUTPUT_PATH"
xcodebuild docbuild \
-scheme $PACKAGE_NAME \
-destination generic/platform=visionOS \
OTHER_DOCC_FLAGS="$DOCC_FLAGS"