What classes do I use to implement new movement

I am trying to implement an RTS movement system.
The default one is not that great whenI have like 20 units and I try to move them around obstacles.

I can code, but I am not sure where to start in this situation. Which classes would I inherit to make a new algorithm?
Do I need to create something from scratch or just add a few functions?

In my project, each unit is a character with an AI attached to it. I use a behaviour tree with states to make them move, attack, hold position, etc. Moving is done using the “AI Move to node” with a lot of extra logic around it.