Some collect data to train models, others fetch pages live to answer a question. Each can be allowed or blocked in robots.txt.
Blocking AI search crawlers means giving up on being cited in their answers. Most do not execute JavaScript: content present in the HTML is essential.