Looks like a broken sunroof slider. They are available from Mercedes source and probably elsewhere.
I have a manual roof that doesn't use these sliders but I believe you need to remove the sunroof panel to change.
I have removed the panel on my car about 5 times...it's pretty straightforward to do.
It looks like the other half of the slider is wedged in a place it shouldn't be and that's why the deflector isn't lowering.
If you remove the other broken bit, it will probably close OK, but best to replace the slider at some point.

W123 Power Sunroof Track Felt Feet Slides | Product | MercedesSource.com
mercedessource Product - Most models 280E 240D 300D 300CD sedan and coupe power roofs 1977 to 1985 (note exceptions) These are the Genuine Mercedes felt feet (pad or pads ) that most W123 sunroofs slide back and forth on (note - there are some early models that did not use these - inspect your...
mercedessource.com
I have a manual roof that doesn't use these sliders but I believe you need to remove the sunroof panel to change.
I have removed the panel on my car about 5 times...it's pretty straightforward to do.
It looks like the other half of the slider is wedged in a place it shouldn't be and that's why the deflector isn't lowering.
If you remove the other broken bit, it will probably close OK, but best to replace the slider at some point.