Could you share more information about what kind of bots are you wanting to avoid?
What is the issue?
Some helpful posts, consider blocking some of the known “bad user-agents”, “crawlers” or “bad ASNs” using below posts:
Last but not the least, kindly see more by reading Cloudflare articles which contain a lot of helpful information for better understanding and usage as well in terms of Security and Protection: