Your height will vary throughout the day. You’re at your tallest in the morning when you first wake up. Through the day your spine becomes slightly compressed. (Fun fact: astronauts temporarily become taller from spending time in zero g). Totally possible you just didn’t measure from the very top of your head before too.
You’re young enough that it was probably a growth spurt. It is possible for very heavy people to gain height from weight loss because their spine is compressed less. This is the same reason you’re taller in the morning. When you’re laying down your spine relaxes and spreads out. Once you get up, gravity starts smashing it back down over the course of the day.