Can you concretely suggest what each side should have done at some point in time, to avoid being where we are now? I feel like you're making a rhetorical statement that's hard to map to specific actions.
It happened for a reason and unless that reason has changed then one should expect the same outcome.
This was a proxy war with Iran
There are of course many more suggestions I didn't state. To pretend that there was just no way to avoid this is shameful.