I don't take these events personally, it's strictly business after all, esp when the termination agreement is generous enough, and conduct is kept professional and decent between the employer and employees.
It's like a breakup but on very amicable terms, it sucks at first esp when it's abrupt but you get used to it, and there's always the chance of you getting back together.
No hard feelings!
If the company shows generosity during the separation, going beyond what was expected, I would certainly consider going back. If they only do the minimal required or less, probably not.
Sometimes companies need to do layoffs to survive, or they merged and have duplicate roles. Lots of reasons. It makes sense to take care of good talent that have to be let go in case they come back later.
I can think of three jobs I would happily go back to if they paid what I get paid now (and the companies still existed). One game dev company, one game publisher, and one retail job, where I mostly chatted with other employees, stocked and cleaned up shelves, and helped about a 1-2 dozen customers a night.
My current job I might be willing to come back to at some point if I left it. It has some warts, but it's been pretty good overall.
Other past jobs, not unless they paid 50-100% more than I'm making now. Nothing against them necessarily, but I wouldn't want to have that job again.
If they handle it poorly, then not a chance.
We laid a ton of people off due to Covid. One year later back in business, hired most of them back.