Pero and sino are often confusing for people who are just learning Spanish. They are generally translated as the same word in English, but, but their meanings differ slightly.
pero → but
sino → but rather, on the contrary
sino que → but rather, followed by a conjugated verb
Use pero when you want to mean however or but. Sino is used following a negative statement to introduce an alternative or contrary idea. If the 2 contrasting ideas are conjugated verbs, use sino que instead of just sino.
No vi la película, pero oí que fue interesante. → I didn’t see the movie, but I heard it was interesting.
El hombre rico tiene todo, pero no está feliz. → The rich man has everything, but is not happy.
No voy a caminar a la playa, sino andar en bicicleta. → I will not walk to the beach, but (rather) I will ride my bike.
No hablo español, sino inglés. → I don’t speak Spanish, but (rather) English.
No me dio la torta, sino que la comió. → He did not give me the sandwich, but (rather) he ate it.