Israel had an endless fascination with the idols of Paganism. In time, God allowed these idolatrous nations to invade Israel and carry them away captive as a judgment upon them. The verse quoted is from the Lamentations of the Prophet Jeremiah after Israel's sin brought the nation ruin, bondage and sadness.
This verse is given to instruct all of us about the power of sin to enslave and to take control of human lives. The modern, politically correct word for this is addictions. The Bible reveals the real root of those things which make us slaves - alienation from God through sin.
Consider the verse. Speaking on behalf of the sinful nation, Jeremiah likens Israel to an ox yoked to a heavy burden. He confesses he is bound by God's own hand. This is a recognition that God gives the rebellious sinner over to the power of the sin he has chosen. This is part of the condemnation of God upon the sinner. Having refused God he is under a new and despotic master, sin.
His transgressions hold him, wreathed (or intertwined) around his neck to demand service like the yoke of an ox. His own strength to resist the enslavement is fallen. Man without God cannot kick the habit. Without God he is unable to rise.
What is all this but one more Bible testimony of the need for salvation from sin by the power of the shed blood of Jesus Christ? Slaves need One to redeem them. Captives need a Saviour. All the human self-help programs are limited in their benefit. Full freedom comes from the hand of God by the power of His salvation. "If the Son therefore shall make you free, ye shall be free indeed" (John 8:36).