Should I use a Plugin or a Preference to extend a Magento class?
Plugins compose; preferences hammer. A plugin is a stackable interceptor — multiple modules can plug the same method and they all run, ordered by sortOrder. A preference is a one-winner replacement — the last module loaded wins, and any other module that wanted to extend the same class loses silently. Rules of thumb: use around/before/after plugins for behaviour changes; use preference only when you need to replace a non-public method, override a final class, or change the constructor signature (and even then, prefer a virtualType + plugin first). Two preferences on the same class is a merge conflict waiting to happen.