Looks like he scraped his head somewhere -on something- in his cage. Snakes that push on the lid often get such scars, but consider (search for) anything
else in his enclosure that he might have scraped his head on...might be a rough spot that you can sand smooth or remove. It doesn't look that fresh either-
IF it was, I'd suggest using some antiseptic ointment on it (only the NON-pain relief kind), like original Neosporin. Once it is healed (as it appears) & isn't
raw, ointment won't do anything for it.