Should I use a separate power supply or separate grounds in this scenario?
It is not clear for me what is your goal. I do not see why do you need an opto-coupler. You could use a transistor as well. In both schematic the circuit operation would not change.

For real galvanic isolation - for safety or to reduce conducted noise - you need to have separate grounds and supplies, which could float compared to the other one. There should be no connection across the isolation barrier except the isolator device (opto-coupler, transformer, isolator device).
For any other purpose you could use a single transistor.