anschreiben
to write to
To contact someone in writing, for example by letter, email, or message.
Ich muss den Kundenservice anschreiben, weil meine Bestellung nicht angekommen ist.
I have to write to customer service because my order hasn't arrived.

to write to / put on account
Loading your saved state.
to write to
To contact someone in writing, for example by letter, email, or message.
Ich muss den Kundenservice anschreiben, weil meine Bestellung nicht angekommen ist.
I have to write to customer service because my order hasn't arrived.

'Anschreiben' (to write to / write up) is a separable verb. The prefix 'an' separates in a main clause and comes at the end. In a subordinate clause or infinitive with 'zu', the verb stays together.
Die Professorin schreibt die Termine an.
The professor writes up the dates.
When you contact someone in writing, the person or institution you are contacting is in the accusative. No preposition is needed.
Schreiben Sie bitte die Personalabteilung an.
Please write to the HR department.
When something is written onto a surface, you use the structure 'etwas (Akkusativ) an etwas (Akkusativ) anschreiben' (to write something onto something). The preposition 'an' indicates direction.
Der Trainer schreibt die Taktik an das Whiteboard an.
The coach writes the tactics up on the whiteboard.
The expression 'etwas anschreiben lassen' (to have something put on account) means to buy on credit. It is often used in small, personal shops such as a kiosk or bakery.
Kann ich die Brötchen anschreiben lassen? Ich habe mein Portemonnaie vergessen.
Can I have the rolls put on account? I forgot my wallet.
The idiom 'bei jemandem [gut/schlecht] angeschrieben sein' (to be in someone's good/bad books) is a fixed structure. It uses the past participle 'angeschrieben' with the verb 'sein' and the preposition 'bei'.
Seitdem er zu spät zur Besprechung kam, ist er bei der neuen Chefin schlecht angeschrieben.
Ever since he came late to the meeting, he's been in the new boss's bad books.
to write
'schreiben' and 'anschreiben' can both refer to written communication. 'schreiben' is more general: you can write someone a message or message with someone regularly. 'anschreiben' emphasizes the first or targeted contact with a person, often by email or message. Learners may confuse the words because both fit when talking about messages. If only the content or the communication is important, 'schreiben' sounds more natural. If you want to say that you are contacting someone, 'anschreiben' is more precise.

Frau Wolf schreibt den Vermieter an, weil die Heizung nicht funktioniert.
Ms. Wolf writes to the landlord because the heating is not working.
Ich schreibe meiner Schwester jeden Sonntag eine Nachricht.
I write my sister a message every Sunday.