Unfortunately, you will need to replace the trim pieces.
BUT, you can try this in an attempt to mask/fill them a little:
Clean them good with some APC. Then wipe them down with a diluted IPA or final wiped down product to remove any residue. Interior pieces: Coat them with a plastic coating like CarPro DLux or similar. The exterior pieces could also be coated or you could use a trim restoration product like Adam's black trim restorer or solution finish. Make sure it is good and dry-like wait a few days, then coat over top of it with a plastic coating.
That's the best you will be able to do with those pieces.