This depends on what your definition of “optimal” is.
As @Pengocat mentioned, if you put more functionality into one script, it becomes less useable. Say you have an object A_1 that checks for collision with B and C and an object A_2 which should only check for collision with object B. You could drag both scripts CollisionB and CollisionC onto A_1, and only CollisionB onto A_2. This would not not be possible if both collision checks were in one script (…without modifications…).
If you are referring to performance: If you split functionality into two scripts, you’re going to have two function calls. Script1.doSomething() and Script2.doSomething(). A function call does require “some time”, so having two is slower. But that overhead is extremely small. Also, the compiler might “inline” both functions. In this case, the performance difference is basically zero.
However, if you split up functionality into too many files, maintenance might get messy. Say you want to change the way doSomething() does it’s thing: If it’s in one file, you can change it alltogether. If it’s in multiple files, you might miss something out.
So concluding… it really depends on your script’s functionalty, how often it’s going to be used and how many scripts you have. Performance can be neglected imo.