You should dig into Character Movement Component “RVO Avoidance”, there are some variables for this kind of stuff. Also there are some tutorials on the subject, i dont know about their quality so i cant recommend any, but i definetly saw some, the subject what you interested in called “Crowd AI”, so google it.