Can I workout with back pain?

I started getting lower back pain 2 days ago that was 8/10 then next day I tried using roller and the pain radiated to my upper back. I know it’s not from the gym because I’m always careful with my form and the amount of weight I can handle. It still hurts a lot to this day and wondering if I can still exercise and does heavy lifting have to be avoided while I’m in pain? I heard there’s certain exercises to do for back pain but not sure what.

Can I workout with back pain?
Post Opinion