The Law gets a bad rap.
There is certainly a negative component to the Law. The work of the Law is very different than the work of the Gospel. If the Gospel’s work is to revive, the Law’s work is to kill. If the Gospel’s work is to cover over sin, the Law’s work is to expose sin. If the Gospel is the Good News, the Law is the Bad News.
Despite the negative function of the Law, the Law is not bad. The Law is good even when it makes us feel bad. Even when the Law functions for the purpose of exposing our sin, it does not exist for the end goal of your exposure.
The end goal of the Law is always the Gospel.