Disciplining a toddler

3 year old LO is stubborn and whines/cries when something isn’t going her way. I start off with explaining calmly but it won’t go through so once I yell the tantrums stop then go off again, I do warn some privileges will be taken away if the whining doesn’t stop. My husband says, I’m not strict enough. She responds well by doing time out in her room, we say she can come out when she’s calm. But she also panics when left alone in the room. So I try to talk with her first and hubby says to avoid too much talk and excessive yelling, I should just do time out. I also drained from yelling, explaining and time out that I feel horrible, I feel I have failed. What if she develops fear of being alone in the room? Is there any other way to handle it?