@itsSteve, just to build off of what Durran wrote, our nextjs-with-mongodb sample was updated to address an issue with caching the promise vs. caching client instance.
Have a look at nextjs-with-mongodb/lib/mongodb.ts at main · mongodb-developer/nextjs-with-mongodb · GitHub for the updated logic (Cache mongo client, not client promise by baileympearson · Pull Request #1 · mongodb-developer/nextjs-with-mongodb · GitHub shows where else you may need to change your logic to work with this update)