Ibuprofen is very well supported as a treatment for migraines. Not necessarily headaches generally, but definitely migraines.
But there are multiple classes of abort drugs now that a doctor might be able to prescribe you, like triptans and CGRP inhibitors, that work much better than either NSAIDs or acetaminophen.