Since the OP mentions the UK, I assume the question refers to the UK government-sponsored "help to buy" scheme. See https://www.helptobuy.gov.uk/.
The FAQ gives a summary of the definition as
A first time buyer is someone who does not own, and has never owned, a
home anywhere in the UK or the world.
For the full definition, see the declaration you are required to make at https://www.helptobuy.gov.uk/documents/2015/12/eligibility-of-ftbs.pdf/
Note that the above scheme was closed to new applicants at the end of November 2019. However members of the scheme from before that date can continue to use it until November 2029.
Also, note that some mortgage lenders may offer other "first time buyer assistance" finance deals apart from this one.