Sometimes in life we have to step back and look at our lives, including our childhood. Often we form patterns from examples that were modeled for us growing up. We need to look at these patterns and see if they are beneficial or actually causing harm to ourselves in some way, even if in the name of helping others. I recently realized that part of the reason I had major issues with saying no to people for most of my life was because I was stuck in an unhealthy pattern I had learned in childhood.
My Dad always helped others, often at his own expense or the expense of our family. He was a mechanic who became disabled from a workplace injury. His "friends" would ask him to fix their vehicles, often for just the cost of the parts using his mechanic's discount. Occasionally he was paid a small amount for his work, but even then it would break down to maybe a couple of dollars an hour by the time it was done. I use the term friends in quotes because a true friend does not ask someone to do something that would knowingly cause pain to the other person. When my dad repaired cars or even changed the oil, it would cause him a lot of pain that required medication and cause his limp to worsen for a few days. My dad did have free will and it was his choice to say yes or no to these requests, but a good friend wouldn't have asked him to do these tasks in the first place knowing the pain it would cause. He had his own issues that prevented him from saying no, so he is responsible for his pain as well as the person who asked the favor of him in my opinion.
It took me a while as an adult to learn how to say no when people asked for help that would cause me physical pain. For too long, I would help someone move, lift something, or do an activity that would be more than my back could handle and only make myself worse. I had to come to love myself more than others, love myself more than I cared about what other people thought, and to love myself enough to put my health first. That was not an easy nor speedy task, but it is one I am so glad I accomplished. It is very empowering and I believe it helps you to love yourself more when you say no to something you shouldn't be doing for whatever reason. It also gets easier to say no when someone asks you to do something you have no business doing the more often you do it. I admit the first several times can be hard, especially if you have difficulty setting boundaries.
If you find yourself putting others before you, check your patterns and see if you can find their origin, Iss this something you created for yourself or is this a pattern you were exposed to earlier in life and just carried on as if it was what you were supposed to do? Is this pattern of behavior something you started because you wanted people to like you? Either way, you can change. You can put your needs first. It is not selfish as long as it's not all the time and it is preventing you from harming yourself or your family in some way. It is a great thing to help others, when no harm is done while we are helping others.