Changing your passport is really useful as it provides the documentation you need to change your name and/or gender marker on a lot of other documentation.
For this, you'll need access to a scanner and printer (as well as the internet). If you don't have one at home and you can't ask a friend, I'd recommend checking out your local library!
What you don't need: a gender recognition certificate; a birth certificate in your real name or gender; or to being transitioning medically.
Please be aware that you only have the options female and male, and also that the government site with passport guidance uses some shitty outdated language. I'll try to rephrase as much as possible here so you can avoid that.
If you have a Gender Recognition Certificate or a new birth/adoption certificate showing your real ("acquired") gender you only need your old passport and that document, and maybe you want a new photo. If you don't have one, don't panic!
You need four (but will potentially want five) things to get your name and gender marker changed on your passport without a GRC or birth/adoption certificate:
What is specifically required of you here is "a letter from your doctor or medical consultant confirming that your change of gender is likely to be permanent." Unfortunately for you if you're non-binary, the letter needs to state your "new" gender as male or female.
You'll note this medical consultant does not need to be a gender identity clinic (GIC) staff member! If you can find a sympathetic GP or other medical consultant to write you a letter, you never even need to go to a GIC to get your passport changed. If you're attending a GIC your consultant should be able to write this for you. If neither of these is an option, consider contacting GenderGP who may be able to help you out.
In case your consultant doesn't know what to write, below is the wording from my GIC nurse's letter, minus my own details:
Dear [your name],
I am writing this letter to you in connection with your passport or driving licence application.
You are under the care of [your GIC] and are undergoing a process of gender reassignment. I believe your change to a [male/female] gender identity to be permanent. On this basis you should be referred to as [male/female] on all documentation.
Yours sincerely,
[consultant's name]
[GIC name]
I'll suggest the following as an adapted form in case you're not seeing a GIC, but obviously can't guarantee its efficacy:
Dear [your name],
I am writing this letter to you in connection with your passport or driving licence application.
I have spoken with you about your change of gender and intention to live as your acquired gender. I believe your change to a [female/male] gender identity to be permanent. On this basis you should be referred to as [female/male] on all documentation.
Yours sincerely,
[consultant's name]
[medical establishment]