Pension death benefits are generally exempt from Inheritance tax If you’ve taken your tax-free sum, either in one lump sum or as part of multiple payments, but don’t spend or gift it before you pass away, it will be included within your estate for inheritance tax.
If you want to leave a pension to someone after you die you can find more information on Gov.uk as to the options available.