For this, more information is needed. Usually, it is done using the association between the current_user and his manager. You could consider a new many to one *:1 association between your user entity and the user entity itself. Rename the association to user_manager.
Guess you are using a workflow, aren’t you? If not, have a look in Mx 9.12.2, because this is for certain a use-case for it.
Upon task change, you trigger a microflow that selects the employee’s manager. Do this like in 4.2 of this doc: https://docs.mendix.com/studio/workflows/#system