Working principle confusion based on the photodiode, phototransistor and LED circuit
I think you would learn more about this from building a real circuit than you have learned from the simulation.
If you were to build the circuit for real, then you would see that a photodiode in the left circuit would not work.
If you were to use a light emitting diode in your left circuit, then you would see that it lights up when you press the button.
Phototransistors conduct current from their collector to their emitter when exposed to light.
The left circuit makes light, the right circuit reacts to light.
Since this is your homework, I'll leave it at that.


Clear up your confusion between photodiodes and LEDs.
Build the circuit for real and try it out.  I think you will find the reality enlightening.