Galatians 4:25 (NASB)
" Now this Hagar is Mount Sinai in Arabia and corresponds to the present Jerusalem, for she is in slavery with her children."
Paul wrote Galatians to counter teachers who said the Gentiles must become Jews and follow the Jewish law before becoming Christians (2:4). In Gal. 4:21-31 Paul used symbolic language (ἅτινά ἐστιν ἀλληγορούμενα, v24). His basis was that Ismael was born as a result of human effort attempting to fulfil God’s promise (v23) while Isaac born miraculously, an impossibility from the standpoint of human effort, making Isaac the true son of God’s promise. Trying to fulfill God’s promise of salvation based on human effort through the Law, Paul associates with Ismael who was born to Sarah, based on ancient Middle-Eastern custom, through Sarah’s servant. Paul described seeking salvation through the Law as slavery (2:4). Thus, in Gal 4:25 Paul symbolizes the slave Hagar as Jerusalem and Jerusalem’s children as the Jews who were still trying to be saved through the Law given at Mount Sinai.
Hebrew stories are often present a very binary morality. For example, Cain was "bad" and Abel was "good." In other words, they function as props to tell a moral story. In this story, which seems to focus on acceptable vs unacceptable worship, a natural reading might be to see it as prophetic of the acceptable worship of the Judeans, in a sanctioned Temple vs the unacceptable worship of the bulls of Jeroboam.
Isaac and Esau are another binary pair of sons. The point in the Tanach seems to be that Isaac was the seed chosen by God, through whom he would fulfil the promises to Abraham, his good buddy.
Paul seems to agree
[Gen 21:12 NKJV]  But God said to Abraham, "Do not let it be displeasing in your sight because of the lad or because of your bondwoman. Whatever Sarah has said to you, listen to her voice; for in Isaac your seed shall be called.
[Rom 9:7 NKJV]  nor [are they] all children because they are the seed of Abraham; but, "In Isaac your seed shall be called."
[Heb 11:18 NKJV]  of whom it was said, "In Isaac your seed shall be called,"
However, in Galatians 3, Paul reverses course and says that the singular "seed" is Christ, and in Christ shall Abraham's seed be reckoned.
[Gal 3:16 NASB20]  Now the promises were spoken to Abraham and to his seed. He does not say, "And to seeds," as [one would in referring] to many, but [rather] as [in referring] to one, "And to your seed," that is, Christ.
However, in Galatians 4, Paul completely turns the table and says that the "sons according to the flesh" (Judeans) are NOT actually the seed through whom Abraham's would be named, because they are Esau in Paul's story in Galatians 4. The Isaac of his story in Galatians 4 is that now, the Judeans are, prophetically speaking, the Esau of the story, sons of slaves, because they follow the Torah of Moses, and the ones not under the Torah, but under grace, are the Isaac, the child born by a miracle.
Quite a switcheroo, much to the chagrin of the Judeans. They were the vessel of wrath:
[Gal 4:8-11, 21-31 NASB20]  However at that time, when you did not know God, you were slaves to those which by nature are not gods.  But now that you have come to know God, or rather to be known by God, how is it that you turn back again to the weak and worthless elementary principles, to which you want to be enslaved all over again?  You meticulously observe days and months and seasons and years.  I fear for you, that perhaps I have labored over you in vain. ...  Tell me, you who want to be under law, do you not listen to the Law?  For it is written that Abraham had two sons, one by the slave woman and one by the free woman.  But the son by the slave woman was born according to the flesh, and the son by the free woman through the promise.  This is speaking allegorically, for these [women] are two covenants: one [coming] from Mount Sinai giving birth to children who are to be slaves; she is Hagar.  Now this Hagar is Mount Sinai in Arabia and corresponds to the present Jerusalem, for she is enslaved with her children.  But the Jerusalem above is free; she is our mother.  For it is written: "REJOICE, INFERTILE ONE, YOU WHO DO NOT GIVE BIRTH; BREAK FORTH AND SHOUT, YOU WHO ARE NOT IN LABOR; FOR THE CHILDREN OF THE DESOLATE ONE [ARE] MORE NUMEROUS THAN [THOSE] OF THE ONE WHO HAS A HUSBAND."  And you, brothers [and sisters,] like Isaac, are children of promise.  But as at that time the [son] who was born according to the flesh persecuted the one [who was born] according to the Spirit, so it is even now.  But what does the Scripture say? "DRIVE OUT THE SLAVE WOMAN AND HER SON, FOR THE SON OF THE SLAVE WOMAN SHALL NOT BE AN HEIR WITH THE SON OF THE FREE WOMAN."  So then, brothers [and sisters,] we are not children of a slave woman, but of the free woman.
The background of Galatians is, false teachers of Jewish origin taught the gentiles that they needed to become Jews in order to receiving the grace from Jesus. In order words, the gentiles had to comply with the law. Paul was surprised they submitted to their teaching and considered Paul an enemy (Gal 4:16) when he taught against these false teaching.
Paul described the law is an "elemental spiritual forces" (NIV Translation) or translated as "basic principles" (Gal 4:3) to which the Jews received from God at earlier time was to let them "conscious of our sin" (Romans 3:20). Paul said by that time, they were slave under the law (Gal 4:3) because Jesus had once said: “Very truly I tell you, everyone who sins is a slave to sin." (John 8:34). But when time came, God set His Son Jesus redeemed those under the law, that they might receive adoption to sonship (Gal 4:4-5). Paul said now the Galatians were known by God (Gal 4:9), implied that they were entitled to sonship, why would they go backward to become slave again by complying to the law?
Then Paul quoted the example of Hagar and Sarah. Paul was making these comparison;
25 Now Hagar stands for Mount Sinai in Arabia and corresponds to the present city of Jerusalem, because she is in slavery with her children.
26 But the Jerusalem that is above is free, and she is our mother. (Gal 4:25-26 NIV)
Note vv25 & 26, Paul mentioned two cities of Jerusalem; the present one on earth (vv25) referred to the law, and the Holy Jerusalem above (vv26) referred to the sonship in the future. Those who submitted to the law were Hagar's children, still in slavery.
After reading many of the above answers, the only thing I would add is another figurative allusion seen in Genesis, where Adam and Eve sew fig leaves—the work of their own hands.
Genesis 3:7 NASB95
Then the eyes of both of them were opened, and they knew that they were naked; and they sewed fig leaves together and made themselves loin coverings."
And God shed the innocent blood of a ram and covered them with His own hands.
Genesis 3:21 NASB95
The Lord God made garments of skin for Adam and his wife, and clothed them.
I'm saying in a sense we see Adam and Eve doing what we could say is like man's work, man's way of responding to God. The old covenant Paul calls "slavery and bondage" see Galatians 4-5.
The old covenant, allegorically speaking is what man tries to do and cannot keep God's perfect commands yet the New Covenant points us to what Jesus Christ accomplished (His holy and perfect life, His death and His burial, and His resurrection) and so those who by faith are God's covenanted people in Christ are free.
It's just simply imagery I am staying here, not more than that. In the sense that Hagar represents the people of Jerusalem who attempt to perform law work to ascend or bring Christ down.
Romans 10:6 NASB95
But the righteousness based on faith speaks as follows: “DO NOT SAY IN YOUR HEART, ‘WHO WILL ASCEND INTO HEAVEN?’ (that is, to bring Christ down)"
Which is impossible to do. Man tries to do what God the Son has done. Man tries to achieve righteousness by law-keeping to cover (or atone) their own sin and yet in Christ all those by faith are referred to as those who are free (see Galatians 5:1)—the free ones are those in Christ the Messiah by God's promise to Sarah.
Genesis 21:1-3 NASB95
1 Then the Lord took note of Sarah as He had said, and the Lord did for Sarah as He had promised. 2 So Sarah conceived and bore a son to Abraham in his old age, at the appointed time of which God had spoken to him. 3 Abraham called the name of his son who was born to him, whom Sarah bore to him, Isaac.
As we see in the book of Hebrews, specifically chapter 10, says that His work, His blood is better than the blood of bulls and goats. The blood of bulls and goats is bondage to those who go back to it. In that sense that refers to Mt Sinai (Hagar) and yet those who by faith are born of the Spirit are free and not in bondage to the law of sins and death.
Hebrews 10:3-14 ESV
3 But in these sacrifices there is a reminder of sins every year. 4 For it is impossible for the blood of bulls and goats to take away sins.
5 Consequently, when Christa came into the world, he said, “Sacrifices and offerings you have not desired, but a body have you prepared for me; 6 in burnt offerings and sin offerings you have taken no pleasure. 7 Then I said, ‘Behold, I have come to do your will, O God, as it is written of me in the scroll of the book.’”
8 When he said above, “You have neither desired nor taken pleasure in sacrifices and offerings and burnt offerings and sin offerings” (these are offered according to the law), 9 then he added, “Behold, I have come to do your will.” He does away with the first in order to establish the second. 10 And by that will we have been sanctified through the offering of the body of Jesus Christ once for all.
11 And every priest stands daily at his service, offering repeatedly the same sacrifices, which can never take away sins. 12 But when Christ had offered for all time a single sacrifice for sins, he sat down at the right hand of God, 13 waiting from that time until his enemies should be made a footstool for his feet. 14 For by a single offering he has perfected for all time those who are being sanctified.
What Christ fulfilled was the work of God, the work of His own hands so to speak. But the workings of man under the law are still "in bondage to keep the whole law".
Lastly I will close with this passage in hopes that this helps to clarify my pointing out what I am adding to the conversation.
James 2:10-12 NKJV
10 For whoever shall keep the whole law, and yet stumble in one point, he is guilty of all. 11 For He who said, “Do not commit adultery,” also said, “Do not murder.” Now if you do not commit adultery, but you do murder, you have become a transgressor of the law. 12 So speak and so do as those who will be judged by the law of liberty.
Please let me know if I need to clarify anything more. It's allegorical and the Bible is full of showing man's attempt at making himself right before God, but only God can make sinful man right with Himself through Christ's atonement for us. He shed His blood for my sin, amen!