So there is built in support with it in the native Apple programs now such as notes, you just have to select the pencil which has an "A" on it and it will automatically convert whatever you write into text. If you don't use the handwriting pen you can write something using the normal pen, tap it, and then tap "Copy as text" and you can then paste whatever you've written as text.
There is also a feature called Scribble which allows you to use the Apple Pencil on any input field and it will automatically convert it into text - nuts!
As well as this, there is Notability and MathPix Snip, both of which will convert not just text, but also math equations into latex (you do have to pay for this with Notability however but it is free in Mathpix). Another popular option is Good Notes. I believe they are all powered by https://www.myscript.com under the hood. I don't know if Apple uses the same technology or if they've rolled their own.
I have been so impressed with the overall experience that I think I am now going to attempt to write a long form text project on it as my primary device. You can also purchase screen protectors and Apple Pencil nibs that emulate the feel of paper for an even better experience. You can purchase the screen protectors as regular stick on protectors or magnetic ones that you can just snap on and off. I ordered one of the latter today on Amazon and I'm looking forward to trying it out tomorrow.
Some links for you to check out if you are interested:
https://support.apple.com/en-gb/HT211774
https://support.gingerlabs.com/hc/en-us/articles/36000387873...
https://mathpix.com/handwriting-recognition
https://support.goodnotes.com/hc/en-us/articles/360000172816...
https://www.amazon.co.uk/s?k=magentic+paper+ipad
https://pen.tips