There are many ways of saying “but” in Spanish and many different contexts.
This is the classic “but”. You would use it when you would use “but”. Pretty simple
Tengo suficiente dinero, pero no quiero ir.
I have enough money, but I don’t want to go
Me gusta bailar, pero no puedo.
I like to dance, but I can’t.
When you can split the sentence up and write “However, ….” then you know you can use pero.
This also means but, but this is interchangeable w/ except.
Traje todo menos mi tarea de ingles.
I brought everything but my English homework.
Todos excepto Juan saben hablar en español.
Everyone but Juan knows how to speak Spanish.
Use this as “rather”. This is used when you have a negative in the first part, and contrast it.
No es antipático, sino distante.
He isn’t mean. Rather, he’s serious.
This is just like pero, but the first part is negative.
This is just sino, but a verb follows it instead of an adjective.
No cobré por mi servicio, sino que lo di gratis.
I didn’t charge for my service. Instead, I gave it for free.
El nuevo gerente es eficaz, ______ antipático.
El nuevo gerente no es eficaz, ______ inútil.
Answers: pero, sino. Why? the first part of the sentences determines it.