Welcome to 3FC!
You've done amazing so far with getting to the gym. That's how I began my journey
I admire you for wanting to go by sizes over pounds, that is probably a much better measure of success over the scale.
The weight gain could be from a variety of reasons, but if you notice you're smaller (i.e. fitting into smaller clothes) then that's what really matters. You're likely building muscle and retaining water while burning fat.
I also disagree with the above poster who suggested staying away from weight lifting. Weight lifting is a great way to build and KEEP the muscle you have. You become a bit more compact and look smaller than you weigh

Too often people lose muscle along with the fat when they set out to lose weight; weight lifting helps minimize that.
Healthy eating will ultimately get you smaller, but getting fit is a wonderful way to start!
Good luck on your journey!