OEMs like Samsung/Xiaomi offer their own stock Notes app that can be used offline/locally.
For a classic simple text editor, I use Jota+.
If you need something more sophisticated, you can download the MS Office or MS word app from the Play Store. They're free to use on phones.
There are plenty of alternative note-taking apps in the Play Store.