How can I determine why my circuit is broken after replacing the switch and light fixture?
If there's no current to the fixture or switch, then the fault is upstream. The fact that it was flickering indicates a failing connection, possibly arcing somewhere, which can be a fire hazard. You should check all the junctions on this circuit from the switch back to the breaker until you locate one with a good hot, neutral, and ground connection. And then somewhere between that junction and the next failing junction is your issue. It may be a bad connection that can be repaired at the end, or it may be a bad line and you'll need to rerun that segment of the circuit.

Over the internet, we have no way to be more specific. It entirely depends on how the home is wired and where the fault is located, which we don't have enough information to determine.