Over the many years of being a Christian I am struck by the slight attention given to the principle in this verse. The importance of it cannot be over-estimated. It answers the question, “How are the heathens to be judged”.
It is a very simple formula. What a man does not want others to do to him, he should not do to them. As an example, obviously he doesn’t want others telling lies that would hurt him. He then should not do that to them.
Also, whatever he wants others to do for him, he should do for them. If he is hungry, he would like someone to provide him nourishment. Conversely, he should do the same whenever the situation arises. And this is the source of his judgment.
He will not be asked why he has not believed the gospel he has never heard. He will be asked about the judgment he passed on another. The accusation, true or false, he leveled against another, and yet thought nothing of the same sin in his own life. We know he knows. He can accuse others.
I was told “Do for others as you would have them do for you” is not Scripture. But it is.