Both men and women sometimes choose to have sex with someone else during a committed relationship. This happens for a range of reasons including difficulties sustaining intimacy, lust, boredom and lack of confidence is another reason as well as a need to feel wanted, attractive, be sexual enough, man/woman enough.
If you are in a committed relationship and considering having an affair or sex with anyone else including a sex worker, you should understand that you will inevitably detract from your committed relationship. Even if you manage to keep it a secret you will have to carry that knowledge and keep this part of you separate from your partner. You may also have to carry guilt. You may develop a bond with your lover and then someone, maybe lots of people, are going to get hurt.
Sexual relationships are only as good as you make them. Dissatisfaction with you partner can mean that you hold yourself back -but for a lasting good sex life we need to allow emotional connection with our partner. Part of that involves accepting the things about them you would prefer were different. If you are unhappy in your sexual relationship, getting help to address what you can do to improve it is much more likely to meet your needs than looking around for someone else, where you are likely to repeat the same mistakes.