I answered a day-old post about using Dark mode in Pages. It is not supported, and when you set the document background to black or use the Pages black blank template, that is not dark mode. It is a cosmetic kludge that will export to PDF as a black document and to MS Word as a grey document with dark gray text.
Suggesting that one then reset the Section > Background color and the Format > Text colors back to the original white with black text isn't a productivity blessing. If you do not care about your workflow switching or expended time, then go for it. Don't expect others to rejoice over your discovery though.
Microsoft Word has a Preference > General setting that allows one to benefit from Dark mode and to have a black document with white text for document creation and which saves to PDF or other document formats with a normal white background with black text.
The free LibreOffice Writer allows one to choose the document background and foreground colors, yet export the PDF or other document formats with a white background and black text.