How to avoid situations like this in future?

[OC] As someone who usually drives closer to the white line near the divider, I was luckily driving a bit to the left unintentionally when this happened.

A couple was standing near the divider with their bike parked abruptly, as seen in the video. I didn’t panic because I had enough space to pass them since I was already driving slightly to the left, as I mentioned earlier. However, later, I couldn't stop thinking about what could have happened if I had been driving as usual.

How can I avoid such situations while driving on the right?