1) Npx usage
Instead of npm, try use npx for bypassing misinterpreting issues
npx strapi export --only=content
2) Npm usage
For using npm run, ensure that the -- separator is used correctly.
npm run strapi export -- --only=content