"British law" is a misnomer as inheritance law is very different in Scotland compared to England, Wales and Northern Ireland.
In English and Welsh law, a person can bequeath his property to whom he likes. However, relatives, dependants and others can challenge someone's Will by going to court and claiming 'reasonable financial provision' from the estate. Equally, if someone dies 'intestate' (ie they don't have a will) and beneficiaries are not happy about their inheritance (or lack of), they may be able to make a claim under the Inheritance (Provision for Family and Dependants) Act 1975. These types of claims must be made within 6 months from the date of the grant of probate (Grant of probate is the document issued by the Probate Service which acts as legal authorisation for the executor to deal with the deceased’s assets). The Court does have power to permit claims after this time limit has expired, but this would only be in exceptional circumstances.
https://www.lawdonut.co.uk/personal/claiming-an-inheritance/dependants-claims-against-an-estate
https://www.bishopslaw.co.uk/wills/uk-inheritance-claim/
The situation before 2015 in Scotland was: Scots law provides protection to a surviving spouse and children. Where an individual’s estate is subject to the Scottish rules of succession the surviving spouse/civil partner and children have an automatic entitlement to 'legal rights' (legitim) which if exercised will override the terms of the will. The surviving spouse and children must, however, decide whether to benefit under the terms of the will or make a legal rights claim as it is not possible for them to benefit twice.
https://andersonstrathern.co.uk/news-insight/scottish-succession-law-reforms/
The law has been changed by the Succession (Scotland) Act 2016 and some of the provisions of this Act may still be in consultation. It appears, although I can't find official sources, that legitim is being preserved but the method of calculation and the assets it refers to is being simplified.
The new rules have abolished the right of a widow (this never extended to widowers) and family of a deceased person to claim an allowance from the estate to purchase mourning clothes and provide an aliment to enable bills to be met until the estate was distributed. This was a common law right but has now been abolished.
https://www.harpermacleod.co.uk/hm-insights/2016/march/new-rules-on-succession-in-scotland-how-they-will-affect-who-inherits-your-estate/