You may be rehashing things in your mind on what you may have personally did wrong, but I say forget about it and move on. As you’ve said, employer isn’t a great place to begin with. The reason employer gave you seems weird, maybe even borderlining on illegal firing (I’m not a lawyer so consult one if you want to pursue this,… but doesn’t sound like you want to go back and work again at this place, so why bother? You know what I’m saying?)
So just spend a weekend or so sulking, watch a movie, go out with friends, have a good time, and come Monday pick yourself up and do a new job search. With your skills, you should be able to find another work.
Did you receive any official letter from your past employer on why you were let go/fired/laid off? It’s not very clear. Fired means it’s your fault. Laid off means through no fault of your own, you were let go – maybe business was slow and company was saving money, so you got the axe.
If laid off, you may qualify for unemployment benefits. Terminated/fired for performance issue would not. So there’s big distinction. Sometimes employers would ask the employee to resign voluntarily, instead of them laying them off. I think resigning doesn’t qualify for unemployment benefits. (company trying to trick employee to resign on their own instead of laying them off) Again, not a lawyer so consult someone/govt if you qualify for benefits.