See https://github.com/orgs/vercel/discussions/5539 (the problem that I currently have).
It's easier to set up a NextJS project to set up API routes than to use the native building blocks of vercel functions. There isn't a template for simple vercel functions usage in vercel init. I couldn't find information about es module support or how to build the code (TS) to be correctly supported on the runtime. And it'ts hard to find information because it's mixed with NextJS stuff 😵💫