ham sandwich?

so i’m 31 weeks, and i just ate a deli ham and cheese sandwich, after i ate it my mom said i’m not supposed to eat that ?? i haven’t ate it at all during pregnancy this is the first time, is it really bad? is it gonna hurt the baby???!