There are plenty of ways to go around this, but the most professional way to go around writing sarcastic side comments would either be directly through either their dialogue, their thoughts, or in the case of 3rd person, even right in the text. The point of view of your story can alter the best answer to this story.
1. If you are writing in First Person Perspective:
This is the easiest way to add sarcastic side comments to your story, seeing as the story is told though the main character’s perspective. Because people are sarcastic all the time, slipping a sarcastic comment in dialogue or even directly into the text as a thought can actually add realism to your character. (This rings especially true if your character is a teenager.)
Side comments would be best placed in thoughts, as they don’t create a certain emphasis on discussion that dialogue often brings. In showing thoughts in a first person perspective story, you can either italicize it, or leave it be as a part of a natural piece of text. This choice matters heavily on personal preference and the tone of your piece.
2. If you are writing in Second Person Perspective:
There is no real “good” way to write sarcastic side comment in this view, because the reader might not be sarcastic in any given situation. While I wouldn’t recommend it, it is possible you could slip it in within the text. However, be aware that unless there is another “person” speaking, it is better to avoid making directly opinionated statements in the text.
3. If you are writing in Third Person Perspective:
Although it is also generally better to avoid opinionated statements directly in the text, depending on the tone, sarcastic side comments can work in a third person piece. Such examples are often seen in more childish works, such as “The Series of Unfortunate Events,” where the narrator occasionally pauses and talks directly to the reader. However, this is also often frowned upon, and is easy to mess up and can seem unprofessional.
Sarcastic side comments, in this scenario, might work better if a character says them. An example of this could be seen in a situation where there are a group of friends entering a potentially dangerous scenario. One of the friends could reply, “Oh this will be safe” or something of that nature.
I hope this helped! If its unclear anywhere, please don’t be afraid to ask clarification or for more information.