A simple way to keep the configurations identical between multiple pi-holes.
Gravity Sync is a handful of core bash commands, that uses rsync to reach out to a remote host, copy the running gravity.db file that contains the Pi-hole blocklist, and then replaces the copy on the local system; running in the background.
Gravity Sync will not overwrite device specific settings such as local network configuration, admin/API passwords/keys, local hostfiles, upstream DNS resolvers, etc.
One Pi-Hole need to be designated as primary and one as secondary.
The designation of primary and secondary is purely at your discretion and depends on your desired use case.