Jesus is observing a cultural practice here that meant that people would regularly swear oaths on all sorts of things that in effect made them worthless. And so he is not saying do not make oaths at all, but rather consider seriously what you say you will or won’t do and ensure that you tell the truth. To be a truth telling people is hard, it swims against the tide. But Jesus is the truth incarnate, and we are to follow him and speak truth.