. . . Jesus did not come to abolish the Mosaic law. (Mat. 5:17-19, Mat. 8:4, Mat. 23:2-3, John 7:19-23 and elsewhere.)
Regarding Matthew 5:17-18, it means that Jesus Christ came the first time not to abolish the prophecies in the Mosaic law and the Old Testament prophets regarding the Messiah's/the Christ's first coming, but to fulfill all those prophecies (Luke 24:44-48; e.g. Acts 3:22-26, Isaiah 53). Matthew 5:17-18 cannot mean that Jesus came not to abolish the letter of the commandments of the Old Covenant Mosaic law, for He did come to do that, on the Cross (Ephesians 2:15-16, Colossians 2:14-17, Romans 7:6; 2 Corinthians 3:6-18, Hebrews 7:18-19). Also, Matthew 5:17-18 cannot mean that Jesus came to fulfill the letter of all of the Old Covenant Mosaic law's commandments, for He could not possibly have done that. For example, some of those commandments applied only to women after childbirth (Leviticus 12:4-8), or to wives suspected of adultery by their husbands (Numbers 5:19-31).
As the Christ (Matthew 5:17, Luke 24:44-46), the mediator of the New Covenant (Matthew 26:28, Hebrews 12:24, Hebrews 7:22, Hebrews 8:6-9), Jesus had the divine authority to contradict the letter of the Old Covenant Mosaic law's commandments and replace them with His own, even better, New Covenant commandments (Matthew 5:38-44, Matthew 19:7-9, John 8:5-7), such as those He gave in the Sermon on the Mount (Matthew 5:19 to 7:29) and in the epistles of the apostle Paul (1 Corinthians 14:37; 1 Thessalonians 4:2). And as the Christ, Jesus had the divine authority to allow His disciples to break the letter of the Old Covenant Mosaic law's commandments (Matthew 12:1-8).