As you lose more weight, its important to track the percentage of weight loss rather than only the number on the scale itself. We all have a base weight with all of our bones and internal organs that won't change (if we're healthy) and the muscle and excess fat on top of that are the variable amounts.
For example, using big/round numbers for easy math, not for actual healthy goals - If SW is 300lbs and GW is 100lbs, then the total excess weight one would need to lose is 200lbs.
If that person goes from 300lbs to 200lbs (100 lbs total loss), that is 50% of excess weight lost.
If the person is now at 150lb and still trying to go to 100lb (50lb excess remaining), then a 50% loss would only be 25lbs.
While its not the exact same amount of effort, you can use this to frame it in your mind that roughly the amount of effort to lose that first (300 - 100) matches the effort needed for the 25lb loss from a 150lb current weight.
Again, these aren't precise or necessarily healthy weight numbers I gave, I was just trying to paint the picture to help reframe things to prevent being unnecessarily negative to yourself. You are still doing great!
Also, don't forget that muscle weighs more than fat (I think it is roughly 1.5x heavier than fat for a given amount). As you build more muscle from exercise, you will gain weight, but it will be healthy weight. That's why it is important to also focus on more non scale victories later in the process, since the number on the scale isn't everything as you approach the finish line!