Since IIRC Shortcuts is actually pretty clunky, it's probably easier to use Control Center to toggle grayscale, which is possible after you add the control named "accessibility shortcuts" using {settings > control center}. That is what I use.
On iOS, you can also set up the “accessibility shortcut” (settings -> accessibility -> accessibility shortcut), which lets you triple-click the home button to enable it.
(And on Gnome, I use and recommend the following: https://extensions.gnome.org/extension/4012/gnome-bedtime/)