Task object is not Supported for UI API.

For list of supported objects for UI API, check the following link
https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_all_supported_objects.htm
If you are looking for a way to create Task, without Apex, try Screen Flow.
Sample Flow:

Output:

