How they're built
WordPress is a complete CMS. Content, templates, plugins and the admin panel all live in one PHP application and one database. That makes it easy to get started and easy to extend without code, which is why so much of the web runs on it.
Next.js is a React framework, not a CMS. Developers build the front end in code and connect a headless CMS such as Sanity for content. Pages can be pre-built with static generation or rendered on the server, and the editing admin lives separately from the public site.
There's also a middle option: headless WordPress, where editors keep the WordPress admin and Next.js renders the public site. It keeps a familiar editing experience and moves the front end to modern code, at the cost of running two systems. It can be a sensible bridge for teams with large content libraries and established editorial habits.