The way I perform ghusl is that I make intention, and then wash my entire body with water, and at the end, I pour water over my body. Pouring water over my body is not necessary, but I do it for good measure.
Today when I was performing ghusl, I washed my entire body, which technically meant my ghusl was complete, but before pouring water over my body, I went out of the shower to the shelf on the bathroom, to get something. Then I came back and poured water over my body and finished ghusl.
I am now worried that since I left to get something (I was still in the bathroom by the way) then my ghusl won't be valid, I think shaytaan is giving me waswas.