Question: A relative passed away recently. Can I cut my hair?
Answer: Yes, you can. There is no worldly rationale or teaching by the Buddha against this, especially if it will make you more tidy and clean.
More importantly and urgently, you should practise the following to guide your relative to the best rebirth: https://purelanders.com/wake.