Recently I have converted one of my iCloud notes into an EPUB by first copying and pasting its content to Pages (by parts, since the entire content was not willing to be copied for some reason), then by manually designating all the headers as Pages headers (to get the table of contents working), and then by using the Pages "Export to EPUB" option. This was a lengthy and unpleasant procedure. Is there a better way to turn a note into an EPUB? By the way, I specifically need to have all the images from the note in the resulting EPUB document.
Sorry you had challenges with the copy to pages. In my experience, the content from the note to Pages is generally excellent and one step. Pages has EPUB export capabilities and has taken over all functions for complex document authoring and layout that the discontinued iBooks Author app provided in the past for macOS.
I think you will find the hassle to get it into pages lessened over time and benefit from having it in a format you can edit easier than PDF.
Once your notes grow more complicated, doing the authoring in pages first may be the best solution so you are not hobbled by the limited features and choices made for notes app to be a lightweight authoring environment. Pages is much better for things that fall between PageMaker / LaTeX documents and notes which hit the phone / pad / desktop sweet spot for basic function.
You can save a Note as a PDF in the Notes App. Then you can use EPubIr to convert the PDF to EPUB. EPubIR is an app available at the link above. It sells for $2.99.