Most Excel lookup functions return the first match, but XLOOKUP can reverse the search direction to return the latest record.
Excel has quietly gained dynamic arrays, XLOOKUP, Power Query, and Python, yet many still work the old way.