comparable firms vs comparable transactions

In mergers and acquisitions, I get confused between comparable firms and comparable transactions. Does anyone have a magic trick to differentiate them?

Comparable firms are just firms you can compare the firm you’re valuing.

Comparable transactions method are valuations based on similar firms acquired in the past.

Exactly that.