Muscle spasm in left groin/thigh while sitting. Am I compressing a nerve? Where is the said nerve?

Yes. It sees like with sitting you are causing compression in the area of the abductors and maybe the gluteus muscles. It depends on your weight and what type of exercise you do, . Running, elliptical machines and stair climbing can cause tightness in the quadriceps and hamstring muscles. With a unilateral spasm, it could be the way you sit at your desk or drive your car. May need an evaluation.