Go to Power Platform admin center, select an environment.
On the command bar, select Settings > Integration > Teams integration settings.
On the Microsoft Teams collaboration and chat page, turn on Sync Teams chat data with Dynamics 365 records.
Save the changes.
Thanks.!!