Micro Servo and Optocoupler

If arduino can supply 5v or even 3.3v logic then there is no need for any extra things.

Attach pwm pin of arduino to signal pin of sg90(yellow wire). And from external power source attach gnd and vcc to brown and red wires.

And tie gnds together.

Load servo example and test.