I think it's better to get educated on what types of life insurance and plans there are and go from there. Much of the info on this thread 'get life insurance' does not pay out on death, so I'm not sure why people refer to this as an inheritance.
There's life insurance for a term, that's the most usual one, and that is one you pay often when your kids are unable to earn for themselves and when you have a mortgage, many mortgages require this. So if you have a 20 year mortgage, you cover the cost of the mortgage for 20 year term and it expires after that. That's what most people mean by life insurance and it does not give you an inheritance unless you die within the term!
Whole-life policies do exist (life assurance), but are much more expensive as they have to pay out! Some are just small funeral plan ones, such as those advertised on telly and those pay out a few thousand and you might be paying in for a long time. Others are more like investment vehicles and require considerable investment over the long-term.
Please get advice on this and don't just 'get life insurance' thinking you will be getting £100k at the end, the vast majority of life insurance does not pay out, which makes sense otherwise how would the companies make money if they paid out far more than you put in?
There's a balance here- if you pay a lot for say a funeral plan, you might be better off just saving the money over the long term in a specific bank account with a good interest rate, the returns are poor unless you are at death's door!
Life insurance is more expensive as you age and if your health is poor so again, this is an odd suggestion.
I think a lot of people on here need to know more about all these different financial products as many seem to think they are offering far more than they are not- you don't get given £100,000 when you die for £40 a month unless you tragically die young (within the term)!