Your open confession before God is a mercy, for it shows that conscience is not yet seared and the Spirit is still striving with you. Do not despise this uneasiness, but heed it, for it is a call to careful self watching.
You describe a true pedigree of sin, as the apostle James declares it. Lust, when it has conceived, brings forth sin, and sin, when it is finished, brings forth death. The glance that seems so small, the lingering look upon a woman with lust in the heart, is not a trifle. What a man is, the man before long does, and the heart that is not kept unspotted will soon show its spot in the life. Our Lord has taught us that to look upon a woman to lust after her is to commit adultery already in the heart, and that law reveals how far purity must go. Purity and charity are the two great garments of Christianity, and you cannot wear one and cast off the other. To keep himself unspotted from the world is the work set before every believer.
You also describe how one temptation makes way for another. The idle hour given to doomscrolling becomes the trial, and Satan makes it a temptation. The same providence may be a trial from God and a temptation from Satan, but you must not suppose that therefore you are compelled to fall. The prayer our Saviour taught us is, Lead us not into temptation, and that prayer breathes a humble self distrust which shrinks from the conflict because it knows its own weakness. There is courage there, for the soul looks temptation in the face and dreads only the evil it may work within.
Hear this truth plainly. The man who prays, Lead us not into temptation, and then goes into it, is a liar before God. You need not ask the Lord not to lead you where you have led yourself. If YouTube is to you a pinnacle of temptation, you must not go to the pinnacle and then pray not to be cast down. Never go into temptation. Make no provision for the flesh. If the phone or the screen is the snare, put it out of reach in the idle hours, set strict bounds, bring your browsing into the light with a faithful brother or pastor who will ask you how you have kept your vow, and fill the vacant hour with better work.
For without Christ you can do nothing. Not some great work only, but no little act of purity, no victory over a wandering eye, can be done apart from Him. Every grain of self reliance is poison. Self loathing for what sin has made of us, and self distrust for the future, are necessary graces. You will never trust yourself again when you have seen what your heart can do when left alone. That is why the pardoned sinner prays without ceasing, Lead us not into temptation, and Deliver us from evil.
Therefore examine yourself honestly before the great heart searcher who tries the reins. Set apart season for self examination, not with mock humility that loves to speak ill of itself before men, but with true self knowledge before God. Ask, am I resting in Christ alone for salvation, or am I hoping that my sorrow will itself atone. Salvation is through Jesus Christ alone, His blood and righteousness, and there is no other name. Ask also, am I willing to be made pure, even if it costs me the pleasure of the eye and the ease of the idle hour.
Then act upon what you pray. Flee youthful lusts. Turn from the image the moment it appears, and cry to God in that moment. Replace the doomscrolling with profitable labour. Visit the fatherless and widows in their affliction, open the Book, pray, labour with your hands, walk among the brethren, for an occupied heart and an occupied hand give temptation less room. Keep your covenant with your eyes as Job did, and remember that marriage is the lifelong covenant of one man and one woman, and that all sexual desire belongs within that covenant alone. Whatever lies outside it, whether in thought, image, or act, is sin to be repented of, not indulged.
There is forgiveness with Him that He may be feared. Look to Christ crucified, see hands and feet given to the rough iron and His whole self to mockery and scorn for sinners, and hear His shrill cry, My God, my God, why hast thou forsaken me. He bore the curse that lust and all sin deserved, that whosoever believes in Him should not perish. Confess your sin to Him without excuse, trust His atoning blood to cleanse you from all sin, and ask Him for a new heart that loves purity because it loves Him.
I will pray for you, that the Lord will give you a deep hatred of this sin, a watchful heart, a clean eye, and a life kept unspotted from the world, and that you may prove the power of His grace to keep you and to restore you when you fall, till you stand complete in Him.
May the Lord deliver you from evil, and keep you by His power through faith unto holiness.