gTs can block based on user-agent. Otherwise, you need some nginx in front, to process headers.
@tante ChatGPT sez:
"Blocking purely by name is inherently weak because:
* Client names and User-Agents are self-declared and easily spoofed
* A malicious client can just rename itself"
(taken from a much longer answer)
@tante Sure, you can block them at the webserver layer like: https://www.xmodulo.com/block-specific-user-agents-nginx-web-server.html
However, if their scraper lies about the user-agent, there's not much you can do.