sondern
but rather
After a negation, introduces a correcting or contrasting statement. It clarifies what is true instead of the negated situation.
Er ist nicht müde, sondern einfach nur faul.
He isn't tired, but rather just lazy.

but rather
Loading your saved state.
but rather
After a negation, introduces a correcting or contrasting statement. It clarifies what is true instead of the negated situation.
Er ist nicht müde, sondern einfach nur faul.
He isn't tired, but rather just lazy.

The word 'sondern' (but rather) can only be used when the first part of the sentence contains a negation, such as 'nicht' (not) or 'kein' (no/not a). It corrects the negated statement and presents the correct alternative.
Das ist kein Apfel, sondern eine Birne.
That is not an apple, but rather a pear.
Like 'und' (and) or 'aber' (but), 'sondern' (but rather) is a conjunction that does not change the word order. The sentence after 'sondern' is a normal main clause with the verb in position 2.
Wir fahren nicht nach Berlin, sondern wir fliegen nach Hamburg.
We are not driving to Berlin, but rather we are flying to Hamburg.
In the fixed combination 'nicht nur ..., sondern auch ...' (not only ..., but also ...), 'sondern' connects two aspects. It emphasizes that not only the first thing is true, but additionally the second thing is too.
Er spricht nicht nur fließend Deutsch, sondern auch Spanisch.
He not only speaks German fluently, but also Spanish.
and
'und' and 'sondern' can both connect two words or parts of a sentence. But the difference is important: 'und' simply links things together; both pieces of information are true together. 'sondern' is used after a negation and corrects something: not A is correct, but rather B. The words can be confused especially when two things appear in the sentence. If both things are true, 'und' fits. If the first thing is negated and the second is the correct information, 'sondern' fits.

Du bekommst morgen keinen Kaffee, sondern Tee.
You won't get coffee tomorrow, but tea.
Im Supermarkt kauft die Fahrerin Wasser und Brot für die Pause.
At the supermarket, the driver buys water and bread for the break.