There isn't really a concept of sub department however there are a couple of easy options to perhaps have something similar.
First you can use Help Topics, so that once a ticket comes into a department, someone can set a suitable Help Topic which best describes the ticket.
As an example, there may be an IT Department, then Help Topics such as General, Software Install, AV Support, and Purchasing.
You can then filter/sort on these Help Topics and/or add "Sub Queues" using the custom queues functionality: https://docs.osticket.com/en/latest/Agent/Tickets/Personal%20Queues.html#what-is-a-custom-queue
Another way to have sub departments may be to use Teams, and simply create a Team which has a sub set of agents who are in the department.
To continue the example, there might be an "AV Team" made up of only a few agents in the IT department. When a ticket comes in needing AV support, the ticket is assigned to the Team, not to an individual. Then all members of the AV team can track easily which AV tickets are needing to be actioned.