If you're able to max out all of your tax-advantaged accounts you should be spending after tax dollars on healthcare before you spend HSA dollars.
You don't get the tax sheltered space back after you take the money out, so why give it up if you can spend taxable account dollars on your healthcare expenses? You can leave the money in there to grow without paying taxes on the dividends, and you can even shift between funds freely with no taxable events.
Plus, once you're 65 you can withdraw for any reason (healthcare or otherwise) without penalty. Even before that you can withdraw money for healthcare expenses you incurred years ago if you need to, doesn't matter how long ago you incurred the expense but it's probably a good idea to keep records/receipts.
See:
https://www.bogleheads.org/wiki/Health_savings_account#Paying_current_expenses_out_of_pocket
On the other hand, though, it seems to me that if you're
not maxing out your tax-advantaged accounts yet, then you
should pay out of the HSA. If I pay medical expenses out of pocket, but I'm not maxing my IRA and 401k yet, then every dollar out of pocket for medical expenses is one less dollar in my pocket put into those other accounts. Even if you take money out of the HSA as you're putting money in thru work, you're still getting the full deduction on your income. So paying out of the HSA means you will have more leftover dollars in checking and savings for your IRA, thereby increasing your income deduction.
Let's say you have $1000 after bills to invest in your tax advantaged accounts. But then, oh no! $500 medical bill. If you pay that $500 out of pocket, then put the remaining $500 into your HSA, you have gotten a $500 income deduction, and increased the amount in your tax-advantaged accounts by $500. Cool. But if you put $1000 into the HSA, but then pay the $500 out of your HSA, you have still increased the amount in your tax-advantaged accounts by the exact same $500, but you get a $1000 deduction this time. Win!
If you're not maxing out your tax-advantaged accounts, then you're either taking those dollars out of your HSA, or you're just never putting them into the IRA. So increase your deduction. Once everything is maxed out, THEN start paying out of pocket.