A variation of this has been around since the first beta, but what the heck:
tell application "System Events"
tell appearance preferences
set dark mode to not dark mode
Save it in Script Editor named “Toggle DM” (or whatever) and select “Application” as the File Format, which makes it activate by clicking on it in the Finder. I recommend putting it in the Dock or Finder window toolbar for quick access.