Meditation

Yes it’s just one technique. It’s not a necessary technique.

Another technique is to imagine that you’re doing something for the last time. That doesn’t necessarily have to involve thinking about death. You can just imagine, hypothetically, for some reason, that this is the last time you will eat a Western omelette. That can get you to pay more attention to and enjoy the Western omelette more.

Another technique is to get some perspective by imagining people in a worse position. E.g. if your computer is being slow and you find yourself getting frustrated by that, you can imagine what it’d be like to not have a computer at all, or to have a super old one as opposed to a moderately old one, and that can change your perspective and allow you to deal with the current moment better.