In next js we have to create a seperate file for each new api like for /user there will be user.js with a seperate handler. And a seperate one for /user/goldmember. Will it not create too much files? Is there another way?
There's no other way to route pages in Nextjs. Websites are not built to handle large/excessive number of routes, because it's not really necessary. If you're worried about creating i.e. large number of user endpoints (/user/:id), that's where dynamic routes come into play.