要不是 + [noun] + ,[subject] + 就 / 早就 + [verb phrase] + 了
要不是 + [clause] + ,[clause]
要不是 opens a sentence with something that did happen, and the second half says what would have happened without it. It takes a noun or a whole clause.
The second half usually has 就 or 早就 and ends in 了, because it describes the outcome that was avoided or missed. 早就 adds "long since".
The thing after 要不是 must be a fact. You're saying it happened, and imagining the other way round. For a real "if not" about something still open, use 如果不 or 如果没有.
Because it points at a cause, 要不是 + person is a common way to thank someone, or to blame them.