I'm going to both agree and disagree with the two posters above. Traditionally women were less likely to cheat. However, times have changed. Whilst we still have some way to go to achieve true gender equality, things have shifted enough that women are now beginning to show similar behaviour regarding fidelity - in other words, having more affairs - at least according to this survey in 2018: www.bustle.com/p/millennial-women-are-cheating-more-than-millennial-men-a-new-survey-finds-7873841
To sum it up, whilst in older generations (e.g. the Boomers) women cheated less than men, Millenial women actually cheated more - albeit only by 1% or so, so it was pretty much equal. Even so, this shows a major shift and overturns traditional assumptions about genders. Women appear to be just as able to cheat as men and it might simply be that what repressed this previously was actually opportunity (harder to cheat when your confined to the house and there was no internet) and social pressure ("good" women don't do that sort of thing).
From my own anecdotal experience, many of the women I have known have cheated because there was something they were unhappy with. In most cases, however, this wasn't something the man was responsible for directly. One was desperate to have children and they were struggling to concieve. She admitted to me later that she thinks she wouldn;t have cheated if they'd have been able to have a child easily. In a way it was an exit affair, so she could have a kid more easily with someone else.
With a few others it was usually after having kids and feeling life was dull. They'd expected marriage and kids to be a Disney movie, full of endless sparkles. And then they hit the point a lot of middle-aged men do, when you'd had the kids and been together a decade and thought "is that all there is?" All of them had a good sex life. All of them were still getting on well with their husbands. All of them , though, were fed up of school runs and home finances and responsibilities - even when their husbands were doing their bit - and fantasised about going back to their pre-parenting days when they could get swept up in a wild, new romance and run off on holiday on a whim.
Shirley Glass makes this point in her book "Not Just Friends" (for the record she was a relationship counsellor who also became baffled at how many of the couples she was counselling had, essentially, happy marriages and yet had still experienced infidelity, so began to research why this might be). The crux of it is that some people turn to cheating as form of escapism when life sometimes gets tough - e.g. when a partner gets very ill or small kids are involved - the same way some people might turn to drink or eat too much.
The idea that it's always the fault of the cheated-on partner is, I think, a comforting myth. If we tell ourselves this we can also say "so long as I don't do anything wrong myself, I won't get cheated upon". But Shirley Glass' research shows that it is a myth, by-and-large. A colleague's husband serially cheated on her after she fought cancer. The fact he found this a drag, and chose to ease his stress by sleeping with other women, has nothing to do with her failing to meet his needs and everything to do with his own method of self-medicating in a time of mutual stress.