edin I see what I assume is the Spectrum ONT hanging at the bottom. And it looks like that’s plugged into the Spectrum router in the picture. I’m trying to understand how the Spectrum modem I see next to the Spectrum router fits into the topology if this is fiber.
Now, if you plug T-Mobile into the WAN port of the Spectrum router, I’d expect it to use that first and only fail over to the Spectrum 5G backup if that also fails. Unless they have a monitor configured from the router to an internal endpoint within the Spectrum WAN that’s unreachable from the public internet. In which case, the WAN will also stay down and it will skip over the T-Mobile. But it sounds like you already tried it, and it works.
If you’re trying to do primary + two failover WANs directly on the UniFi gateway, I’m not sure that any of their hardware supports that. You could double NAT behind the Spectrum hardware as WAN1, then fall back to T-Mobile if both Spectrum fiber and 5G fail. I wouldn’t do the double NAT, but it would theoretically work as long as you don’t mind that the UI gateway will only see one WAN for both Spectrum connections and any inbound NAT/port forwarding configuration would be a little more complex.
I can’t see a way to do double failover natively with the Spectrum router alone. However you configure it, unless you double NAT behind the Spectrum router as I described above, I think you’d want to treat the Spectrum router like a 5G modem hanging off of the “real” gateway at the edge of your network. If you want to use all three, it’s really getting into territory where you’d probably want to consider a more flexible gateway solution like OPNsense, pfSense, or look for second-hand enterprise gear. You could connect all three WANs directly to interfaces on something like OPNsense, then use gateways within the config to control which WAN to send traffic to when one or two go offline.