Team builder is an activity module developed by UNSW, which allows you to build teams based off a set of criteria. It assigns students to groups based on their answers to a series of questions that you specify. You ask your students some questions, and then develop a predicate based off their answers for your teams.
It’s also having a great drag-and-drop interface for building Groups; if you just want to make your groups yourself but hate the time-consuming Moodle method, then you can use Team Builder to make your life a bit easier.
Here is nice demo of the team builder activity module, which is a bit old but still valid:
There is a nice how to use guide which can accessed here: https://teaching.unsw.edu.au/create-moodle-groups-and-groupings-using-team-builder
You can download the Team Builder activity plugin from this link: https://moodle.org/plugins/view/mod_teambuilder