Every now and again it’s important to action something based on values changing on records that have been updated (or inserted). In Salesforce, triggers can be set up to monitor when records updated, inserted, deleted, or, undeleted. This little code snippet will allow you to check if a field on a record has been changed from the previous value.

public with sharing class TriggerHelper {
  public static Map<Id, Boolean> isFieldChanged(Set<String> fieldList, Map<Id, SObject> mapN, Map<Id, SObject> mapO, Boolean isDelete) {
    Map<Id, Boolean> output = new Map<Id, Boolean>();
    if(isDelete) {
      for(Id o :mapO.keySet()) {
        output.put(o, true);
      }
    } else {
      for(Id nId :mapN.keySet()) {
        SObject n = mapN.get(nId);
        SObject o = null; 
        if(mapO != null)
          o = mapO.get(nId);
        
        output.put(nId, false);
        
        for(String f : fieldList) {
          if(o == null) {
            if(n.get(f) != null) { // insert, so 'o' will be null
              output.put(nId, true);
              break;
            }
          } else {
            if(n.get(f) != o.get(f)) { // both values differ
              output.put(nId, true);
              break;            
            }
          }
        }
      }
    }
    
    return output;
  }
}

An example of usage:

trigger MyTrigger on Contact (after insert, after update) {
  if(Trigger.isAfter) {
    // if either of these fields have been updated on a record the return value for that ID will be true.
    List<Contact> contacts = Trigger.New;
    Set<String> f = new Set<String>{'Funding_Nation__c', 'OwnerId'};
    Map<Id, Boolean> isChanged = TriggerHelper.isFieldChanged(f, Trigger.newMap, Trigger.oldMap, Trigger.IsDelete);
    
    Map<Id, Contact> processable = new Map<Id, Contact>();
    for(Contact contact : contacts) {
      if((Boolean)isChanged.get(contact.Id)) {
        processable.put(contact.Id, contact);
      }
    }
  }
}