Yes, you can build a backend with Next.js. It allows you to build server-rendered React applications, which means you can use it to handle server-side logic such as database queries, authentication, and authorization. It has built-in support for serverless functions that can be used to handle backend logic and respond to API requests.
Additionally, Next.js provides a set of data fetching methods (getServerSideProps, getStaticProps, getServerProps) that can be used to fetch data on the server and render pages dynamically. However, it's worth noting that Next.js does not provide a built-in database solution, so you will need to use a database management system like MongoDB, SQL, or Firebase to handle data persistence.