Just to add to the above answers, digital images and pdfs are only available for deaths up until 1957. If the death is after that date then you still need to pay for the paper certificate.
You can search for free on the GRO website for both birth and death certificates.
Go to the GRO website
https://www.gro.gov.uk/gro/content/
and choose 'Order certificates online'
You will then need to register and create a free account.
After you have logged in then choose 'Search the GRO Indexes'
Choose 'Death' and then the year the death was registered - you can search for +/- 2 years either side.
You then need to enter at least the surname and sex.
You can enter other information that you have to narrow down the search.
For example, a relative of mine who died in 1946 had a fairly common surname.
Searching for his surname in 1946 +/- 2 years there are 250 deaths recorded.
When I add in his first name, this comes down to five people. It also gives the age at death and location where the person's death was recorded.
Of those five people with the same name, one died in each of York, Manchester and Liverpool and two died in Gloucester. The year of death, the age and the location enabled me to identify which was the correct person.
You can then order the death certificate directly from the search results (the same for birth certificates as well).