How to do shuffling of dataset for cross validation?

I’m working on a data science project in which I have to do a shuffling of my dataset randomly to train a machine learning model on it. I have learned many methods available for it. But after research, I found one that is below:

Can someone provide me with all other available methods with a bit of explanation?