dichten
to write poetry
To compose literary texts, especially poems or other works of poetry.
Schon als Kind liebte sie es, kleine Gedichte zu dichten.
Even as a child, she loved writing little poems.

to write poetry / to seal / to make up
Loading your saved state.
to write poetry
To compose literary texts, especially poems or other works of poetry.
Schon als Kind liebte sie es, kleine Gedichte zu dichten.
Even as a child, she loved writing little poems.

The verb 'dichten' has two different origins. On the one hand, it belongs to the word family of 'Dichter' (poet) and 'Gedicht' (poem), in literature. On the other hand, it is related to the adjective 'dicht' (tight, sealed) and means 'abdichten' (to seal).
Goethe hat viele berühmte Balladen gedichtet.
Goethe wrote many famous ballads.
In the meaning 'abdichten' (to seal), the verb is used for practical, manual tasks. Typical objects are 'ein Dach' (a roof), 'ein Fenster' (a window), 'Fugen' (joints), or 'ein Leck' (a leak).
Der Handwerker hat das Leck in der Wasserleitung schnell gedichtet.
The craftsman quickly sealed the leak in the water pipe.
The meaning 'lügen' (to lie) is colloquial. It is often used in the reflexive construction 'sich (dative) etwas zusammen dichten', which means 'to make up a story'.
Er hat sich nur eine Ausrede zusammengedichtet, warum er zu spät war.
He just made up an excuse for why he was late.
to write
'schreiben' and 'dichten' can both mean that someone composes a text. 'schreiben' is the general word for letters, messages, stories, articles, and many other texts. 'dichten' is used mainly for poems or especially literary texts. The words can be confused because poems are also written. But not every written text is poetry. In practical terms: you write a report; you can write a poem, or more specifically, 'dichten' it.

Für den Geburtstag ihrer Mutter dichtet Anna ein kurzes Gedicht.
For her mother's birthday, Anna writes a short poem.
Am Abend schreibt Lena einen Bericht für ihren Kurs.
In the evening, Lena writes a report for her course.