Are you talking about the black rubber piece between the top of the door and the bottom of the window on the outside? With similar pieces along the right and top? If so start by thoroughly hand washing it until it stops turning the sponge black. Next get a product like Meguirs #40 or similar. It's vinyl and rubber cleaner. Soak the rubber and rag and wipe over these items until the rag stops getting black or at least greatly reduced.
This process pulls all the accumulated dirt out of it, remove the part of the rubber that is coming apart and then protects the rest of it. Then do this once a month for the rest of the time you own it.
I've had great success with this on many vehicles over the years.