I believe there are no built-in tools in allowing you to create a .txt file on your iPad, so I recommend you some their-party utilities to finish such work: Simplenote, IA Writer, 1Writer, and Drafts.
Good luck~
For reasons I will not list, I have the need to create a .txt file, however, I am using an iPad (7th generation) on iOS 15 and because of that, I haven't the foggiest idea how I am supposed to create a .txt file. If you say "Well, you could try the document scanner" I won't use it, why, simple answer, I don't know how it works and if I did, I doubt it would create a .txt file. I don't have a Mac or computer or anything like that, so any answer involving a computer, I will take with a grain of salt. If it revolves around the iPad though, I will be happy to hear your potential solution.
I believe there are no built-in tools in allowing you to create a .txt file on your iPad, so I recommend you some their-party utilities to finish such work: Simplenote, IA Writer, 1Writer, and Drafts.
Good luck~

Failed to erase, partition, or repair your drive due to the error, 'Couldn't modify partition map.' on Mac? This article help you resolve it and get back the lost data.

An introduction to the macOS Library folder, tells how to access the invisible Library folder on Mac and how to make the macOS Library folder visible in Finder.