Tools > Export in the dashboard gives you one XML file with everything. wp export makes the same WXR format, but you choose what goes in.
Only the pages, into a folder of their own:
mkdir -p exports
wp export --post_type=page --dir=exports
You can narrow it further. --start_date and --end_date take dates like 2025-01-01, --author takes a login or user ID, and --post__in=12,34,56 exports exactly those posts. --skip_comments leaves comments out, which I find useful when you only want to move content to a test site.
Big sites get split into several files, 15 MB each by default. Change that with --max_file_size, or set it to -1 for one file of any size. To pipe the XML somewhere else, use --stdout instead of --dir.
Keep in mind what WXR is: posts, pages, terms, comments and authors, not a backup. Settings, plugin tables, users’ passwords and the media files themselves are not in it. Attachments are listed with their URLs, and the importer downloads them from the old site later. For a real backup, dump the database and copy wp-content/uploads.
Further reading: wp export