Finish out the passage:
18 For on the one hand, a former commandment is set aside because of its weakness and uselessness 19
(for the law made nothing perfect); but on the other hand, a better hope is introduced, through which we draw near to God. (Hebrews 7:18–19)
The ‘former commandment’ was set aside in the sense that it was not adequate for the purpose of making things perfect. But we must be clear: that was never its function! The Aaronic priesthood was never in business to conduct souls to heaven or to attain eternal forgiveness and justification for sinners. It was weak and useless in that regard. Its purpose was to facilitate the worship of God in the holy Sanctuary here on earth, to conduct the sacrificial services, to carry the blood of sacrifices to the altar, and to bestow God’s blessing upon the worshippers and upon the nation. The endowment of eternal salvation of souls and the resurrection of the dead were not the the tasks of the earthly Temple and priesthood. This understanding is reflected in Paul’s letter to the Romans:
3 For what the Law could not do, weak as it was through the flesh, God did: sending His own Son in the likeness of sinful flesh and as an offering for sin, He condemned sin in the flesh, 4 so that the requirement of the Law might be fulfilled in us, who do not walk according to the flesh but according to the Spirit. (Romans 8:3–4 NASB)