Does Android come with a built-in plain text editor? I need to edit a simple plain text file. Is there a built-in text editor that comes with Android? I have Android 7, LG Stylo 3.

I just need to open a text file, and enter some words:
cat
dog
etc

I need to edit text, then share it via email or have it saved in Android file system so I can share it later.

Second question: if there is no such a thing, what is the simplest plain text editor app available for such task?
No AFAICT, unless it it is preinstalled by the device manufacturer, for example some devices like Xiaomi, Huawei come with a preinstalled document editor (WPS), which not allows you to view but to edit text files as well.

As suggested above, stock android only comes with with text viewer , not editor, in any case if you need to install it, please see Izzy's list of suggested text editors