Last night I was changing my oil and using my smartphone as a flashlight (yes it did get dirty, and no I don't care). In the midst of the job I started wishing I could strap my phone to my head and use it like a headlamp. When I finished my task I went inside and searched the internet for a smartphone attachment that would fulfill my desire, but couldn't find any. I don't believe that such a smartphone mount doesn't exist, has anyone found such a thing?
As a smart phone is somewhat bigger than what would easily fit to my head, you could try attaching it to the upper part of your chest using a belt or a rope.
It will not be as flexible as when attached to the head, but it is easier to fasten more securely. And for most work, it will provide good lighting on your work area.
There does exist straps made for pulse measuring devices and/or action cameras for the chest area, although I haven't seen it for smart phones. These could possibly be adapted to work. I've only seen holders for the upper arm for smart phones.
You CAN turn a smartphone into a headlamp if you want to. Question if it's a good idea though. A headlamp can be purchased cheaply and if it comes damaged whilst working on a vehicle, you can buy another cheaply. I don't know what smartphone you have but I know that mine would cost hundreds to replace so whilst you CAN use it in this way, I personally wouldn't.