Without even pics this makes it quite difficult to identify. Here is the fixit screen-replacement guide for a 13" M2 MBA, perhaps it shows up in one of their steps.
If you look at Step 25 of the ifixit guide I linked, the part with the 3 screws appears to be the lid angle sensor. Does it look like the torn cable connector originated from there?