Once you’ve received your inheritance, unless otherwise stipulated in the Will, you can do what you want with it.
A Deed of Variation can be used by a beneficiary of the estate who wants to alter or redirect their inheritance entitlement.
People can have reasons to not accept a gift from tax issues to generosity.