Add @babel/core and @better-auth/cli to your dev dependencies, install and try again the command npx @better-auth/cli generate. This should solve the problem.
@babel/core
@better-auth/cli
npx @better-auth/cli generate