Jesus not only taught on marriage in Matthew 19, but also addressed this subject earlier in his teaching that is often called the sermon on the mount.
31 “It was also said, ‘Whoever divorces his wife, let him give her a certificate of divorce.’
32 But I say to you that everyone who divorces his wife, except on the ground of sexual immorality, makes her commit adultery, and whoever marries a divorced woman commits adultery. (Matthew 5:31-32; ESV)

Jesus is not quoting the law of Moses and then giving new law. This is commonly taught but this false. I would like to take a moment to show that Jesus is quoting the rabbinical teachings on the law, not the Law of Moses itself in the sermon on the mount. First, right here in Matthew 5:31, where did the law of Moses teach that if you divorce give a certificate? Deuteronomy 24 does not teach that. Go read it again and you will see that is not the point of the text. Jesus is stating what the rabbis had been teaching. You can see this again in Matthew 5:43:
You have heard that it was said, ‘You shall love your neighbor and hate your enemy.’ (5:43; ESV)

Where did the law of Moses say to hate your enemy? It did not! This is the Jewish interpretation of the law to love your neighbor. The rabbis taught to love your neighbor but you could hate your enemy. Look at verse 21 and you see the teaching was do not murder, but it was okay to hate. The law of Moses did not allow hatred and anger toward your brother. In verse 27 the rabbis taught that it was okay to lust in your heart as long as you did not follow through by committing adultery. The law did not allow lusting. In verse 33 the rabbis taught that if you swore by the Lord you had to keep your oath, but if you swore by anything else (heaven, earth, etc) you were not bound to your word. Jesus corrects the Jews’ false interpretation of the law of Moses. Verse 38 reveals that the rabbis taught personal retaliation and vengeance. If you remember we studied this text to show that Moses did not allow personal vengeance. “An eye for an eye” means that the punishment by the judges must fit the crime, not that if someone does something to me I could do the same to them. Jesus is correcting the false interpretations of the law of Moses.

As we come back to Matthew 5:31-32 we see again what we noticed in Matthew 19. The rabbis had taught that a person could divorce for any reason, just make sure to give a certificate. This was not the marriage law, nor was it the law of Moses. The marriage law had not changed since creation, as Jesus argued in Matthew 19. Jesus corrects this false notion of divorcing for any reason and states that all divorce is sin except on the grounds of sexual immorality. This is called adultery because of the assumption that a person will wrongfully remarry. The person who divorces will marry again, but this is committing adultery, yet another sin. The only time when remarriage is not adultery is if your spouse cheated on you and that was the cause for the divorce. This point is implied in Matthew 19, but is explicitly stated here in Matthew 5, “Whoever marries a divorced woman commits adultery.” Jesus made a very plain statement. If you are divorced and have been remarried, and the divorce was not because your spouse cheated on you, you are committing adultery by being married to another. Let’s return to Matthew 19.

You will notice that even the disciples understand the force of this teaching. Notice their comment: The disciples said to him, “If such is the case of a man with his wife, it is better not to marry.” (19:10; ESV). This is important because it reveals that Jesus taught something challenging. If Jesus had taught something easy, then the disciples would not have made this remark. Notice Jesus’ response:

11 But he said to them, “Not everyone can receive this saying, but only those to whom it is given.
12 For there are eunuchs who have been so from birth, and there are eunuchs who have been made eunuchs by men, and there are eunuchs who have made themselves eunuchs for the sake of the kingdom of heaven. Let the one who is able to receive this receive it.” (Matthew 19:11-12; ESV)

It is amazing to me how often these two verses are distorted. Some teach that Jesus is saying that if you cannot receive his teaching, it is okay. Only those who can obey it have to obey. This is utter nonsense. When does God give a command and then backtrack saying that if it is too hard for us, you do not have to keep it? No place does God do this. Jesus is referring to the statement of the disciples. Not everyone can accept the saying of the disciples that it is better not to marry at all if these are God’s marriage laws. Jesus agrees that if you can remain unmarried, then fine. But not everything can remain unmarried. If a person marries, these are the marriage laws God has given: What God has joined together, we are not to separate. Marriage is permanent. If you divorce for any reason it is a violation of God’s marriage law. The only reason God gives for divorce is because your spouse cheated on you. If your spouse cheated on you, you have the right to be remarried. If you divorced for any other reason and you remarry, you are committing adultery, sinning before God.