You face a very common fact pattern for people who show up here. There are several things you can try. But the simple truth is that most of these problems never get better if you stay with your current spouse. Sad but true. No magic wands. No surefire solutions. Mostly a bunch of things to try for a few months, so you can be comfortable that you gave it a decent try before you called it quits.
1. Have the talk. Once. The message of the talk is NOT: "we need to have more sex". The core message is "without more sex, my love for you is steadily declining. I want it to switch to an upward trajectory. If there is anything I can do to help you preserve my love for you, let me know." No specific threats or ultimatums. Just informing her that your love for her is going down, and you would prefer to love her more and more over time, rather than less and less. But less and less is inevitable unless and until you guys have more sex. Once you have said that, never have the talk again. If she offers to talk more, "thanks honey, but we are way past the point where talking will resolve anything."
2. Rock yourself. Hit the gym. Buckle down at work. Pay some attention to clothes and grooming if you have let those slide. If she asks you why, say "I want to be the best version of me I can be." Nothing about her. Nothing about the marriage. Nothing about sex. I want to be my best - for me.
3. Start having activities with guys. Get a happy hour buddy or spend time focusing on a hobby. If she comments that you aren't home as much, or aren't helping more with the kids or the chores, just smile and pat her on the head and joke how cute she is when she gets upset. She will get enraged. This is a test of whether she still has you twisted around her finger. Don't take the bait. Just keep smiling and whistle or hum a happy tune. Show her that she has zero ability to impact your mood.
4. Only accept sex if she is into it. If she offers, but it is clear she is just going to lie there silent and unmoving, then stop the session and walk away. Tell her "thanks babe, but this doesn't do anything for me. Sex is supposed to be a team sport. Let me know when you actually want to play."
It is entirely possible that you will do all these things, and she will pull away. It is possible it won't have any impact on her because the only thing she wants from you is your paycheck, so as long as you deposit that into the joint account every payday, she doesn't give a rat's patootie what you do. Or it is possible that she will file for divorce because she only wants to stay married to you if you are her servant, handyman and to chauffeur the kids at night.
All of these outcomes are as or more likely to occur than she suddenly realizes how much she wants to have sex with you. But the "trick" is, if you hit the gym, rock it at work, improve your wardrobe and grooming, and spend more time with the guys, you will be in a much better place to deal with divorce and post-divorce life. So you are investing in your own future. If she wants to come along for the ride, she knows what the cost of admission is. If she doesn't want to pay it, too bad for her. And you are best of finding that out sooner rather than later.