Differences between Last Activity and Last Modified Dates in Salesforce

Last Modified 
The date and timestamp for changes made to an individual record and includes the User who made the change.

Last Activity 
The date when a User last did something related to the record (represents one of the following):

1. The latest Due Date of the Closed Tasks on a record.
2. The latest Date of Events on a record.


If a Record has multiple Activities, the "Last Activity" date will be the Due Date of the Activity furthest in the future. If the Activity Due Dates are 1/10/2018 and 2/10/2018, the Last Activity will be 2/10/2018.

A single Task may be related to more than one record. For example, a Task may be related to both an Account and an Opportunity or both a Contact and a Case. Make sure that records actually reflect last activities by using the "Related To" field whenever you log a call, create a Task, send an email, or schedule an Event.

Check the below for example,

Account with one task and event. Event due date is 10th Nov. Task due date is 21st Nov.

Check the LastActivityDate. It is 21st Nov since the closed task due date was 21st Nov.