Fungus gnats would be my first guess. They affect a lot of plants, and usually show up if the soil is too moist.
Is your new apartment colder than your old one? That could explain why the soil isn't drying out as fast as it should. Try moving the plant to a warmer room, or turning up the heat. Putting it up on a high shelf could help too, since colder air sinks and warmer air rises. Also, consider waiting longer between giving the plant water, especially in the winter.
As for your infestation, there's a long list of anti-gnat techniques at https://dengarden.com/gardening/Fungus-Gnats-All-you-need-to-know. I'd check it out. The steel wool trick is especially intriguing - I have an English ivy with a gnat problem, and I'm going to see how well it works. [Update: I tried steel wool and it was lousy. It didn't seem to stop any of them from getting out.]
People also seem to have good results with apple cider vinegar traps, https://homeguides.sfgate.com/use-vinegar-rid-fungus-gnats-house-plant-40394.html, or off-the-shelf yellow sticky traps, https://www.flowerpatchfarmhouse.com/how-to-control-fungus-gnats/. [Update: I tried both of these. The apple cider vinegar didn't work at all and smelled terrible. Yellow sticky traps caught a few gnats when I put them right on the edges of the pot.]
If you still need to keep it under control, consider biological controls like predatory nematodes (Steinernema feltiae) or Bti bacteria. You could also try an insecticide, although they can be risky to use indoors.
Finally, if you ever need to re-pot the plant, buy some good succulent potting soil, not regular soil, because snake plants need something that drains really well. And if you're the type to make your own plant soil, make sure to sterilize it in the oven or microwave before you use it.