Both phrases can be correct, but they have slightly different meanings and uses:
"This shouldn’t happen": This phrase implies that the event or situation in question is undesirable or unexpected. It suggests that the event is not appropriate or acceptable. For example, "This shouldn’t happen in a well-run organization" means that it is inappropriate or not expected for the event to occur.
"This shouldn’t have to happen": This phrase implies that the event or situation is unfortunate or unnecessary, often suggesting that something could have been done to prevent it. It conveys a sense of inevitability or regret. For example, "This shouldn’t have to happen if we had planned better" suggests that the situation could have been avoided with better planning.
In summary, use "this shouldn’t happen" to express that something is not desirable or appropriate, and use "this shouldn’t have to happen" to express that something is regrettable or preventable.