When you choose System Settings > iCloud : Saved to iCloud [ See All ] and select Pages (=⦿), a Pages folder will be created on iCloud Drive (for the duration of this setting). When using Pages, save your documents to iCloud Drive and they will be written in this folder. Do that on both Macs and you will have a common repository of Pages documents for both Macs while each have Internet access.
After this configuration on each Mac, launching Pages will now show a File Chooser, not the customary Template Chooser. The latter can be revealed with File menu > New…
This will only work if you both Macs are signed in with the same Apple ID.