Nanophotonic cavities are the foundation for a broad spectrum of applications, including quantum sensing, on-chip communication, and cavity quantum electrodynamics. In van der Waals (vdW) materials, these cavities can harness polaritons, which are quasiparticles emerging from photon interactions with excitons, plasmons, or phonons that are confined in microscopic sample flakes. Hybrid phonon–plasmon cavities leverage the long lifetimes of phonons and good tunability of plasmons, but their reconfigurability remains fundamentally limited. Here, we introduce a magnetic-field-tuning mechanism for polaritonic cavities in a vdW heterostructure. Specifically, we demonstrate that the primary Landau transition in magnetized charge-neutral graphene can be harvested for controlling polaritonic cavity modes in a graphene-based phononic heterostructure. Additionally, we predict a magnetic-field-induced topological transition in the polariton isofrequency contour, causing a nontrivial cavity mode profile redistribution. Our study underscores the versatility of Landau-based nanophotonic cavities, offering new paradigms for the design and manipulation of light–matter interactions at the nanoscale.