2PC makes one transaction span systems: a coordinator asks all participants to prepare (vote yes and hold locks), then broadcasts commit or abort. Atomic, but blocking — a dead coordinator strands participants holding locks. That fragility is why the microservices world usually prefers sagas: local transactions plus compensating actions, trading atomicity for availability.
Worked example: a coordinator asks all participants ‘can you commit?’ (prepare); only if every one votes yes does it tell them all to commit, giving atomicity across databases. Gotcha: it is blocking — if the coordinator crashes after prepare, participants hold locks and wait; that fragility is why many systems prefer the saga pattern across services.