When you start talking about hundreds or thousands of agents, A* pathfinding just doesn't cut it... Too many calculations per frame.
One common approach as mentioned by DMGregory is "flow fields"... For each target/destination, create a texture or 2D array and populate each cell with the path direction at that location.
Agents can then look up the value for their current location and head in the right direction.
Example: https://www.youtube.com/watch?v=zr6ObNVgytk
Steering behaviours and/or added randomness can help make the movement appear less regimented.
Another thing to bear in mind is that having a script on n objects means at least n function calls per frame.
Unity attempts to address this with an "Entity Component System" known as DOTS (Data-Oriented Technology Stack).
Fundamentally, the idea is that you have a set/group of things that need to navigate and a single method loops through them and handles the movement.
There's an ECS renderer that can render objects/meshes based on their position data in the set.
This means you don't need an actual game object, which significantly reduces overhead.
NB: ECS is not ready for production yet. There's a preview available that's pretty good and handles all the basics including physics, but advanced functionality that interacts with other systems (like animation controllers) was lacking the last time I checked in.
It may or may not suit your needs. There are also libraries on the asset store that achieve something similar.