It's a combination of a few things. I've always been fairly chill, and I think these factors help further that zen.
Having a potent sense of humor makes it easy to laugh off anything from mundane to tragic. Always preferred to "laugh, so I don't cry." Easily my biggest coping mechanism.
Another good method I heard was this perspective exercise. When something irks you, stop and think "will I still be upset about this a week from now, month from now, year from now?" Usually the answer is no, I'll have completely forgotten about this mild inconvenience. If it's something I'll be upset about a year out, then I'm justified being upset in the moment.
Finally, another tool of perspective is the cosmic absurdity of it all. Here we are, sharing this tiny mossy pebble of a space ship called Earth, in the middle of the goddamn boondocks of outer space. If this entire planet disappeared overnight, the universe at large wouldn't even notice. For an inconceivable distance in every direction is a cosmic lifeless void. In the absolute grand scheme of things, all these little grievances are so insignificant. It's insane that any of us are here. We'll return to infinite nothingness soon enough. Take a deep breath, enjoy the ride while it lasts.
Idk maybe hit a joint once in a while too lol