Create an add task quick action on a custom object. Then determine what fields are displayed on the Activity timeline.
1. Navigate to Setup > Object Manager > Locate your custom object. On your custom object, click Buttons, Links, and Actions in the left sidebar.
2. Click New Action.
3. Create a Quick Action on the Task object. Complete every field on this page.
4. Click Save.
5. Go to your custom object's page layouts and drag and drop your newly created Action from the Mobile & Lightning Actions section onto the Salesforce Mobile and Lightning Experience Actions section:
6. Click Save on your page layout.
Change the fields on the Task activity layout
To change the fields on the Task activity layout, please return to the Quick Action you created, and click Edit Layout:
Edit the layout to add or remove fields: