Fungus...necrosis. Get it checked.
Well now I'm spooked.
"However, if a red or black spot occurs under the nail without trauma, it is important to have it checked out by a doctor as it may be melanoma."
Ah ha I think I just found the explanation! You can get that kind of bruise from hiking downhill. Your toe gets too much pressure on it from the hiking boot going downhill. You have been doing some hiking recently.
Here is the link to the explanation of the likely cause of that bruise. https://www.healthline.com/health/subungual-hematoma
I had a toenail that gradually turned brown similar to that. I bought a product at Wallmart called TINEACIDE Antifungal Cream. When the brown started on another toenail sometime later, I started applying this stuff and it cleared up. It takes while, but it works.
A good boot seller will have a small ramp in the store. You point yourself downhill and work your foot as far as you can to the front of the boot. If your toe hits, the boot doesn't fit.
The hiking boots I bought a while back have sufficient toe room.
They might indeed have sufficient toe room under most conditions. But even so you could have been on a downhill grade for a short section of the trail that had the perfect combination of down slope combined with a side slope that forced your toe way down into the toe of the boot with just enough pressure on that big toe to induce a small bleed. You may never see that happen again when wearing those boots so if you like them then keep on using them. A single unique incident does not make for a bad pair of boots that need to be discarded.
I should've said sufficient downhill toe room.
Maybe this article will help. It is how to tell if a dark discoloration is a bruise or if it is fungus. https://www.docontherun.com/209-how-to-tell-a-bruise-under-the-toenail-from-toenail-fungus/
If that's your gas and brake pedal foot, I would have it looked at by a good mechanic.