There aren't many guidelines for composing a soliloquy; simply let your characters express themselves! However, keep in mind that the structure of the soliloquy will reveal something about the individual and their state of mind to the listener. So, at a peaceful time, an educated character will provide a well-structured soliloquy that progresses from one issue to the next in a logical manner. A character who is more unstable (or who is experiencing strong emotions) should offer a disorganized and chaotic soliloquy.
What is a soliloquy?
A monologue spoken by a character at a point in a play when a character is alone. The technique frequently reveals a character's innermost thoughts, including his feelings, state of mind, motives or intentions.
When should a soliloquy be used?
Soliloquies are used solely in creative writing and do not belong in formal writings. A soliloquy is also typically associated with highly styled creative writing. Soliloquies are a little unrealistic since individuals don't act like that in real life. Unless you apply great lamp shading, a soliloquy detracts from the overall realism of the work. Soliloquies should be avoided in general if you're aiming for realistic realism. Soliloquies are far more prevalent in visual media (theatre, television, cinema, online games, graphic novels, and so on) than in textual media. This is for one simple reason: they aren't required in writing. You may receive the same data without needing the character make a long speech by just saying "John thought" instead of "John stated." You may still employ a proxy soliloquy if you wish to convey a figure sliding into loneliness and frantically seeking the company of inanimate beings, for example.