Next.js is a full stack framework. So you definitely can put your backend in Next.js.
But should you? Let's figure that out.
Theo on Youtube - https://www.youtube.com/c/TheoBrowne1017
Tweet that inspired this video - https://twitter.com/t3dotgg/status/1580621415891419136
Follow me on Twitter - https://twitter.com/dadevil99