Joomla turnstile question

I run a Joomla 3.10 site (yes, I know it’s old, but it’s the only version that runs JoomGallery well, so I still use it. There is a JoomGallery in Beta mode for J4, but it’s not nearly as interactive or configurable and it is recommended by the authors not to run it on a production site). Anyway, recently reCaptcha stopped working when people go to verify themselves after entering a comment on an image. The reCaptcha box is right below the comments box. What happens is that the reCaptcha widget displays a continuously circling verification progress icon, and users cannot enter comments on images, therefore, no one is commenting on any of the images in my gallery.

I am hoping that Turnstile will help me with this. I did try it, got my keys, placed the script snippet into my index.php page under the section as instructed, and entered the sitekey in the script snippet. So far so good. But then when I go to see if I get the Cloudflare Turnstile captcha upon entering a new comment on an image, I do not see the widget.

It is not clear to me in what file or how to enter the code for the widget in the exact same place where the current reCaptcha sits. My knowledge of php is not that limited, I know mostly what I’m doing but where do I put the widget code?

I couldn’t figure it out, so I deleted the Turnstile for my site and removed the script snippet from index.php.

I would love some help with this because it seems like the ideal alternative to reCaptcha now that Google has refused to update or change their code for reCaptcha rendering anyone who uses it for their site unable to verify comments (or whatever the use it for).

Thanks to anyone who can help!