Hi @FGRODRIGUEZ ,
You can do this a number of ways. I normally would utilize a real-time workflow to populate the data right away on Create or on Change of that field on the table. In the workflow you can do an update step and reference through to the lookup field and grab the department and set it on the record.
A couple more options:
1. Might be able to utilize a Calculated field that could refer to the field from the User / Department table but there are limited supported types within calculated fields.
2. Another option (still in preview) is PowerFX formula column to pull in this value from the related entity. Again, check types and applicability...
3. Power Automate could execute and update this value based on the create / update of the record.
Another thing you can do which is actually "not" bringing into the record is you could to the following:
1. Create a View that shows the related field from the User for the Department in all list views of your rows.
2. Create a Quick View form for the User table that shows the Department and then add this quick view form to the task form to see the department.
The advantage of this approach is if the Department of the user changes on the first table it will not have to try and update all related tasks with this updated value. This is key because the data would get out of sync (unless you are trying to track at time of creation only).