There are a few different reasons that people accept being underpaid, but the biggest one, I think, is impostor syndrome. At core, many people – maybe most people – just don’t believe they’re as good at their work as other people. (The irony here is that people who don’t think that are probably the incompetent ones – see the Dunning-Kruger effect) So when it comes time to ask for money, they freeze. They don’t feel like they deserve to be paid as much as other people.
If you freeze, one thing you could do is work through that sense of unworthiness. Remind yourself of your skills and accomplishments. Get a loved one to remind you of what you can do.
The other thing you can do is just ask for the money anyway. Worthy or unworthy, deserved or not. It’s not for you decide if they want to pay market value. That’s for your employer or client to decide. You set the rate you want to do the work. They decide if they want to pay that rate. It has nothing to do with moral value.
And, for your client or employer, it’s not some big emotional thing. For you, it’s a whole referendum on your worth as a person and a professional. For them, it’s about how much flex they have in their budget. No one is going to laugh because your rate is a little higher than they expected. No one is going to point and mock and ask why you thought you were worth that kind of money. They’re going to agree, negotiate, or tell you they can’t afford it. That’s all.