I’ve been told that I should lift weights but when I do, my weight goes up. Should I be lifting weights?

Absolutely, you should be building lean body mass through some sort of resistance exercise. Lean mass is more metabolically active, meaning it burns more calories than fat mass. It also weighs more so you may weigh more on the scale but you will be leaner. You may see your clothing size go down or your belt will be too big. But that is an indicator of improved health.