Why it is so complicated to style things in markdown or in other markup languages

Markdown was created to be simple and plain. Its main goal is regarding information availability and portability.

The way it works is by implementing a simple structure and leveraging from HTML — another markup language, where you describe your format in the contents of the file, and it is also legible as plain text, without any special visualization tool — and, following the same philosophy, it separates text from formatting such text.

Usually tools that are used to work with Markdown, such as Obsidian or vscode, render the files to HTML and then apply the format as per some predefined rules. Some tools allow you to create extra formats. As this process happens after the document has been translated from its input format into HTML (the most common case, but not the only possibility) the layout and formatting is done through CSS stylesheets. If you were working with Markdown using some LaTeX tool, for example, you would have to style your output using the specific syntax from LaTeX.

So, due to the goal and separation from content and appearance, this is why you have to format documents in Markdown using a different approach than you'd be using with word processors and tools where format is embedded within the same file, but aren't legible outside of these tools without some format loss or without adhering to some standard with a subset of what the tool alone can do. You can think of native Word format versus RTF format or what happens when you open Microsoft Office documents in Open Office, as an example of that loss / compatibility mode.

Are there any advantages in that?

Yes, there are advantages to that approach. Decoupling information and formatting makes your text more legible.

I, once again, will use LaTeX as an example. A document in that markup language is full of formatting instructions to help positioning and creating what you want to see in paper.

HTML also has more noise in its documents and some tools misbehave by adding all formatting inline with the HTML code.

For both, if you do everything inline you'll have to change all instances of your text. It is using Microsoft Word without using styles for each part of your text, so if you want to change font size, color, paragraph alignment, etc. you'll have to search for all occurrences and manually change them.

When you use styles and stylesheets, you have a centralized definition of the presentation layer. You can change things in one place and the whole document will change.

This separation is what allows the Markdown format to be so simple and available universally in different tools: even Google Docs can export to Markdown.

What can I do for prettier outputs?

You'll have to identify if the tool you use provide some customization possibility or not. If it doesn't, then your choices are living with what you have or changing tools or processing your files externally to convert them to something better.

If it does provide some customization possibility then you'll need to check how to use it and how to style your notes. Some tools provide themes to help get started with that.

But, in the end, it depends on the tool you use and how much you want to change things.