That looks like rv vinyl trim that tucks into a track. If so, replace it.
https://www.amazon.com/RVMATE-Insert-Trailer-Camper-Travel/dp/B08HPTVM5D/ref=mp_s_a_1_1_sspa?dchild=1&keywords=rv+vinyl+trim&qid=1629143961&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyTDFFR1VTN0hOT0sxJmVuY3J5cHRlZElkPUEwMjg5MDgyNjZIMjZBSE9QOVBPJmVuY3J5cHRlZEFkSWQ9QTAzODMzMTYzUUFGVEJLNlFVQksxJndpZGdldE5hbWU9c3BfcGhvbmVfc2VhcmNoX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=