The most straightforward way to do this is utilizing Cloudflare load balancers with geo steering. This allows you to create pools containing one or more servers and associate them with particular geographic regions. The load balancing is based on the Cloudflare POP the user connects to rather than the geo of the user themselves (if a user in China hit a POP in Los Angeles you’d likely want them to hit a server near the LA POP rather than making a connection back across the Pacific to retrieve data anyway).
Self serve plans can use the pre-built Cloudflare topologies in geo steering, Enterprise customers can use the API to create a per POP mapping if they want to get really fancy (if you really want the extra control).
In theory you can do the same thing in Cloudflare workers, but load balancing includes health checks and other advanced features which makes implementing much simpler in my experience.