you’ll probably want to use a dedicated product for trim restoration such as Solution Finish Black Trim Restorer; will permanently bring back the black finish of the trim by dyeing it and should effectively mask minor scratches.. you can also take it a step further using magic eraser on the scratch but it will also remove texture in the area and whiten it, then apply Solution Finish on top; optionally you can protect on top of Solution Finish with a ceramic coating that works on trim like Gyeon Trim / Kamikaze ISM / Zipang