You're right, up to a point; anything we do that hurts others is a sin in God's eyes. If you look at what is forbidden by the Ten Commandments, for example, you'll discover that most things on the list deal with sins that hurt others -- murder, lying, stealing, adultery, and so forth. (You can find the Ten Commandments in Exodus 20:1-17.)
But this isn't true of all the Ten Commandments. The last, for example, forbids covetousness (that is, a deep yearning for something that belongs to someone else). But covetousness isn't an outward action; it's something that goes on only in our hearts and minds. Nor does it apparently hurt anyone else (unless it leads to something like cheating or stealing). And yet God still labels it a sin.
Why is this? The reason is because every sin you commit hurts someone -- including you. If you allow covetousness to take root in your soul, for example, it will hurt you, and turn you into a self-centered, greedy person. Every sin hurts someone, even if it's only ourselves.
But God loves you and doesn't want you to be a slave to sin any longer. That's why He sent His only Son, Jesus Christ, into the world, who by His death and resurrection overcame sin's power over us. Don't be deceived, but by faith turn to Christ for the forgiveness and new life you need. The Bible says, "Everyone who sins breaks the law.... (But) he appeared so that he might take away our sins" (1 John 3:4,5).