This feature allows sorting by column values in Lightning. However, this does not appear to be working for the Activity History or Open Activities related lists.
The Product Team has confirmed that this is a known limitation and working as designed.
This limitation specific to the 'Open Activities' and 'Activity History' related lists.
Alternatively, Instead of relying on the "Activity History" and "Open Activities" related lists, you can use the Activity Timeline component, which provides a more comprehensive view of activities.
Please consider creating or promoting the Idea: Allow Sort Ability for Columns on Enhanced Related Lists in Lightning so the larger Salesforce Trailblazer Community can vote on expanding enhanced related lists availability to these related lists via a future release.
'Open Activities' and 'Activity History' Related Lists in Salesforce Lightning Experience
000381138

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.