At what week of pregnancy should I stop sleeping on my back?

Pickle

I’m currently 17 weeks pregnant, when is it best to stop or when did you doctor advise you to stop sleeping on your back? Right now it’s not uncomfortable for me, but I want to makes decisions that’s best for the baby. I don’t know if it’s true or not but I heard that it can cut off oxygen and circulation for baby.