For sure a new high end phone will do better than a mid-range camera that's older, but on the high-end it's the other way around. My Z8 has significantly better low-light performance than my iPhone 16 Pro, however the upside from the iPhone is that I don't need to do additional denoising in post-processing (I usually use DXO) where it's required on anything taken above around ISO 12800 on a digital body.
The Z8 is usable to print (e.g. noise is almost completely removable if you aren't cropping) up to ISO 25600 (which is the maximum ISO of a 90D), and is usable for moment capture (e.g. not trying to win any awards) nearly to its maximum ISO (102400). Many newer camera sensors, including the Z8's sensor, are "dual gain", meaning I can shoot basically noiseless at ISO 500 w/ almost 13 stops EV of dynamic range preserved, which is simply not possible on any phone camera or on most older bodies.
If you're shooting in low-light often enough, there are specific sensors and cameras which are far better than others, even if the other cameras would be better than in other situations. Generally speaking though, larger sensors are better than smaller sensors in low-light at the same pixel pitch.
In the Canon world, an R6 II is comparable to the Z8 in low-light performance, although I think the Z8 just barely edges it out. So don't take anything I'm saying here as being brand-specific. Modern full-frame mirrorless cameras are almost all better at low-light performance than any preceding full sized (DSLR style) camera, mirrorless or not, because the sensors have gotten better but maybe even more importantly the native denoising has gotten better.
People are leaving off which lens. In my experience, for low-light:
Large sensor + kit (zoom) lens < Pixel Pro < Large sensor + f/1.4 prime
It's not apples-to-apples, since my phone has no optical zoom in the lens (although it somewhat makes up for it by having wide/normal/tele fixed lenses). But shooting with the main lens, it definitely beats a large sensor for low-light with a kit lens.
I think the key difference is intelligent multiframe denoising algorithms on the phone. It, in effect, shoots a video and combines.
That said, a /lot/ of low light performance is simply having a much larger sensor with a wider pixel pitch that is able to gather more light in the given time allotted. You cannot beat physical size in some ways for digital photography and light gathering is one of them, as it is primarily about surface area.