Sharepoint List Threshold Limit Causing the sharepoint designer workflow to Suspend

One of the task lists which was used in designer workflow reached the threshold limit and because of which the workflows are suspending with the below error.

RequestorId: f307e5c6-0c50-b022-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 500 {“error”:{“code”:”-2147024860, Microsoft.SharePoint.SPQueryThrottledException”,”message”:{“lang”:”en-US”,”value”:”The attempted operation is prohibited because it exceeds the list view threshold.”}}}

There is a line in the workflow where it fetches the assignedTo field with taskname filter condition and the same exact line is throwing the above error.

Can someone please suggest to me how to overcome this error without increasing the threshold limit because the list can hold upto 30 million items as Microsoft document.