Workers is a usage-based product
You will be billed on the number of requests made to your Cloudflare-powered domains that trigger Workers. Since Cloudflare Workers run before the Cloudflare cache, the caching of a request still incurs costs.
You will be charged a minimum monthly fee of $5.00 per account with Workers enabled. That fee includes the first 10 million Worker-powered requests made across all domains associated with your account. After the first ten million, requests are billed at $0.50 per million. Workers pricing is not dependent on how much CPU time your Workers use, but we do raise the CPU time limits based on which Cloudflare plan you are on.
Your Worker can be configured to only run on specific routes within your site. For example you may only wish your Worker ran on URLs within a specific subdomain or the index page of your site. Only requests which actually trigger Workers count against your billed usage.