Below are passages which clearly show that those in the old covenant could lose their salvation.

In my article, Who-Goes-To-Heaven Scriptures — Narrow is the Way | Who are the Children of God? — “There is therefore now *no condemnation* to those who are IN CHRIST Jesus, who don’t WALK according to the flesh, but ACCORDING TO THE SPIRIT”, I don’t include Old Testament passages and examples, because we’re in the new covenant. Now, the Holy Spirit lives in Christians, so we’re accountable for what we do internally, not just externally.

For example, Jesus said in Matthew 5, we’re now responsible to not lust in our hearts — a much higher standard, because the Holy Spirit enables us to look away. If we disobey, Jesus makes it clear we’ll lose our salvation if we don’t fully repent:

27 You have heard that it was said [old covenant], ‘Do not commit adultery.’ 28 But I tell you [new covenant] that anyone who looks at a woman to lust after her has already committed adultery with her in his heart. 29 If your right eye causes you to sin, gouge it out and throw it away. It is better for you to lose one part of your body than for your whole body to be thrown into hell. 30 And if your right hand causes you to sin, cut it off and throw it away. It is better for you to lose one part of your body than for your whole body to depart into hell.

Here are some examples where the Bible says those under the old covenant (before Jesus’ death and resurrection, and the sending of the Holy Spirit on Pentecost) could also lose their salvation through willful disobedience:

Romans 11
18 don’t boast over the branches [old covenant Jews who lost their salvation]. But if you boast, it is not you who support the root, but the root supports you. 19 You will say then, “Branches were broken off, that I might be grafted in.” 20 True; by their unbelief they were broken off, and you stand by your faith. Don’t be conceited, but fear; 21 for if God didn’t spare the natural branches, neither will he spare you22 See then the goodness and severity of God. Toward those who fell, severity; but toward you, goodness, if you continue in his goodness; otherwise you also will be cut off.

Deuteronomy 29
18 Make sure there is no man or woman, clan or tribe among you today whose heart turns away from the LORD our God to go and worship the gods of those nations. Make sure there is no root among you that bears such poisonous and bitter fruit, 19 because when such a person hears the words of this oath, he invokes a blessing on himself, saying, ‘I will have peace, even though I walk in the stubbornness of my own heart.’ This will bring disaster on the watered land as well as the dry. 20 The LORD will never be willing to forgive him. Instead, His anger and jealousy will burn against that man, and every curse written in this book will fall upon him. The LORD will blot out his name from under heaven 21 and single him out from all the tribes of Israel for disaster, according to all the curses of the covenant written in this Book of the Law.

2 Chronicles 15:1-2
1 Now the Spirit of God came upon Azariah son of Oded. 2 So he went out to meet Asa and said to him, “Listen to me, Asa and all Judah and Benjamin. The LORD is with you when you are with Him. If you seek Him, He will be found by you, but if you forsake Him, He will forsake you.

Numbers 15
29 You shall have the same law for the one who acts in error, whether he is a native-born Israelite or a foreigner residing among you. 30 But the person who sins defiantly, whether a native or foreigner, blasphemes the LORD. That person shall be cut off from among his people. 31 He shall certainly be cut off, because he has despised the word of the LORD and broken His commandment; his guilt remains on him.”

Ezekiel 18 — Spiritual Death
20 The soul who sins shall die. The son shall not suffer for the iniquity of the father, nor the father suffer for the iniquity of the son. The righteousness of the righteous shall be upon himself, and the wickedness of the wicked shall be upon himself.
21 “But if a wicked person turns away from all his sins that he has committed and keeps all my statutes and does what is just and right, he shall surely live; he shall not die. 22 None of the transgressions that he has committed shall be remembered against him; for the righteousness that he has done he shall live. 23 Have I any pleasure in the death of the wicked, declares the Lord GOD, and not rather that he should turn from his way and live? 24 But when a righteous person turns away from his righteousness and does injustice and does the same abominations that the wicked person does, shall he live? None of the righteous deeds that he has done shall be remembered; for the treachery of which he is guilty and the sin he has committed, for them he shall die.

Ezekiel 33 — Spiritual Death
11 Say to them, As I live, declares the Lord GOD, I have no pleasure in the death of the wicked, but that the wicked turn from his way and live; turn back, turn back from your evil ways, for why will you die, O house of Israel?
12 “And you, son of man, say to your people, The righteousness of the righteous shall not deliver him when he transgresses, and as for the wickedness of the wicked, he shall not fall by it when he turns from his wickedness, and the righteous shall not be able to live by his righteousness when he sins. 13 Though I say to the righteous that he shall surely live, yet if he trusts in his righteousness and does injustice, none of his righteous deeds shall be remembered, but in his injustice that he has done he shall die. 14 Again, though I say to the wicked, ‘You shall surely die,’ yet if he turns from his sin and does what is just and right, 15 if the wicked restores the pledge, gives back what he has taken by robbery, and walks in the statutes of life, not doing injustice, he shall surely live; he shall not die. 16 None of the sins that he has committed shall be remembered against him. He has done what is just and right; he shall surely live.

Disobedience is serious!