Hi Hansi,
Thanks for reaching out.
Create one page per department and filter it to that department.
- SP Page Builder → Pages → + Add → New Page, name it "Department A".
- Add a Collection addon, Source = Team.
- Filter → + Add new condition: Field = your Department reference field, Condition = Equals In Reference, Value = Department A.
- Put Dynamic Text / Dynamic Image addons inside the Collection addon for the team fields, and save.
- Menus → + New → Menu Item Type → SP Page Builder → Page → select "Department A".
Repeat for Department B.
On your other question — yes, the index page needs a menu item, and it's not optional. Until the collection's Index page is assigned to a menu item, the detail page URLs (/departments/department-a) return 404. If you don't want it in the navigation, put it in a hidden menu. Note that only Index pages can be picked in the menu item dialog; detail pages and individual items aren't selectable, so a direct menu link to one department item needs a System Links → URL item.
Best regards,