https://www.cnet.com/tech/services-and-software/this-ios-18-trick-can-help-keep-your-notes-app-organized/
Please read more at the above link
How to create collapsible sections
1. Open Notes.
2. Tap the new note button — the square with a pen — in the bottom right corner of your screen.
3. Add a title to the note, like weeks of the month.
4. Tap the Aa in the toolbar across the top of your keyboard. You might have to tap the plus (+) sign over the top right corner of your keyboard to open the toolbar.
5. Tap Heading or Subheading to name your sections, like the days of the week.
6. Fill out information under your headings and subheadings.
7. Tap the space just in front of your headings or subheadings, and a down arrow will appear to the left of them.
8. Tap that arrow and everything under the heading or subheading will collapse.

Tap the gray arrows on the left side of the screen to collapse and expand sections.
Apple/CNET
It’s important to note that headings won’t collapse into each other, and same with subheadings and titles. But if you put a subheading under a heading, the subheading can collapse into the heading. And everything will collapse under a title if there’s more than one title in a note










