In Joomla 4, Joomla includes a plugin to use Google reCaptcha. Ignite Gallery will use the plugin to add reCaptcha to the gallery comments. You can see how to set up commenting in Joomla 4 in this video.
In Joomla 5, Joomla does not have a Google reCaptcha plugin. So you need to add the reCaptcha keys to the gallery component options, like this: