Using the Markdown triple backquote feature (on line by itself both before and after). I think this is best for code samples.
Alternatively, for a different format, use the HTML <details> tag but you will likely need to look up how to use it.
If you stuff this up then you could lock yourself out of your phone. So make sure you know how to recover access before starting on this adventure.