"I want to disable the assignment feature in the sidebar when the user's role is 'Customer'."

“I want to disable the assignment feature in the sidebar when the user’s role is ‘Customer’.”
In the Task doctype

Give Him Read Only Permission for that document

@Govind_Gupta check this