In the movie Batman vs Superman towards the end Superman stabs Doomsday and gets stabbed himself. Why didn't he just have Wonder Woman do this. She isn't affected by the kryptonite.
To answer this question it is critical to actually watch carefully the scene and not just pose it as an abstraction. If it is permissible to condemn something on an abstraction (which there is no factual basis, or indeed counter-factual to what actually happened) then there's no such thing as a satisfactory answer since the questions and answers are inherently illegitimate.
There was not enough time to deliver the spear to WW, convey to her the importance of using it, justify letting go of Doomsday, find an opening, and take his brain or heart before Doomsday "pops" again. Per the Situation Room, each of Doomsday's waves were growing and the next one- if allowed to occur- would kill Lois, Batman, and the blast zone could stretch to inhabited Gotham (certainly the skyward directed beam of a previous "pop" went past the edge of space 100Km up). Both by the timing (use a stopwatch) and visual cues, Doomsday was about to kill the humans in his blast radius, there wasn't time for a cogent hand off.
Distance. Superman flies a considerable distance to meet Doomsday. When they see Wonder Woman fighting with him in the distance she's practically a dot. There was no way to communicate with any kind of nuance over this distance. Meanwhile, Batman was in range of the blast (which exceeds the range of his grenade launcher) and Lois (the sightline cleared by the previous blast, each increasing exponentially). Too close to fragile humans and vital tool (the blast would have vaporized the spear too) to be protected, too far for convenient conversation or hand off.
A thrust spear is always stronger than a thrown one by the same person. Superman's first thrust was insufficient to stop or kill Doomsday (requiring a secondary thrust after being stabbed). That means if Superman had thrown the spear and not been there to follow-up, Doomsday would have been alive and free to simply pluck the spear out and destroy it. That's assuming the spear can survive a throw (different types of stresses). Nothing in this film suggests WW can generate the same level of thrust, it was not worth experimenting, testing, or trusting given the time limit on the "pop"... if WW isn't up to it, Lois dies, Bats dies, the spear is vaporized, hope is lost. Supes knows he can do it so he does.
None of these characters know the effectiveness of Kryptonite with the intimacy that Superman does. WW was told there's a weapon that can kill it, but her reply wasn't, "Then we MUST get that weapon!" She said she's killed things from other worlds before and then proceeds to prove her weapon is capable of cutting Doomsday. If the same thing she accomplishes with his forearm occurs at his neck, she kills him and they win. That said, doing that triggered the beginnings of a "pop"... WW abandons her sword, goes to her lasso, instead of trying to cut-up DD any further and hasten another "pop". Now try convincing her to drop the Gift of the Gods that's been at her side for century for a glowing pig-sticker you insist will do a better job without mansplain'.
Robin's pole weapon has a simple shaft. The Kryptonite spear looks the way it looks because it is functional. There's a button that lets it expand, there are buttons that make it glow and that isn't for show but functional. Watch the film carefully, Kryptonite cuts only while its glowing and it doesn't ALWAYS glow as brilliantly. That means the spear shaft houses NECESSARY technology for its effectiveness. Contrast this against how WW's Amazons use spears. They allow them to flex and bend, they use them as thrown weapons. In either case, the utility of the weapon would be compromised... the flex breaks the power cells inside, throwing it too hard subjects it to unintended stresses. The defective weapon fails to pierce DD and Lois dies.
None of these heroes have fought together before and have no basis for coordinated cooperation. "Is she with you?" Superman- and the world at large- have experienced the supernatural ONLY through Kryptonians. At this point there is no other "magic"... everything with super strength, super speed, super durability on public record has been Kryptonian in origin. Superman encountered Kryptonite literally minutes before. He doesn't know it's pathology, origins, or effects. He doesn't know that it's specifically effective against only Kryptonians, he doesn't know that it won't affect Wonder Woman, he doesn't know if WW derives her powers from a same means or mechanism that would be as susceptible to Kryptonite as him, he doesn't know if he'd be allergic to her glowing yellow rope... his track record with glowing stuff isn't great. There's no time to experiment or do exposition on this. They don't know the nature of Kryptonite or WW well enough to justify placing that burden on her given that Supes can bear it.
Objectively, sitting down with a pen and paper scoring WW like you would a boxing match, her perceptible hit rate (from SM's perspective) is lower than his. This is mission critical. Lois is dead if this fails. Why is Superman motivated to hand over the spear to someone with a lower success rate from his own perspective? Even at the cost of his life it's worth the higher chance of success to protect Lois and the World than the uncertainty of trusting WW. Regardless, WW has demonstrated nothing suggesting she's the superior candidate. She already has a weapon capable of cutting an piercing DD, she's already trying to go for his vital organs like his heart or head. She's already failing to do that. Give her enough time, maybe she succeeds but there's zero indication handing the spear over suddenly speeds this up. Having the spear doesn't suddenly allow her past DD's defenses at his vitals. Superman arguably only hit because WW was restraining DD and Supes was ready to make the sacrifice play which WW may not have been. We see from her fight with Ares how many powers she can deploy when passionate; and this DD fight may not have been as emotionally engaging fight for her to enable those powers. Regardless, Supes wouldn't know about them and have reason to defer to her.
Superman took the Kryptonite because
- He was more likely to survive an up-close encounter with Doomsday
- The Kryptonite was on a spear (see Why Superman was not affected by kryptonite in this scene?)
In the comics, Wonder Woman vs Doomsday didn't go too well
Given that this particular incarnation of Wonder Woman has definitely displayed sufficient strength and speed to use a kryptonite-tipped spear, I am tempted to reply that Superman was scripted as using the spear for symbolic reasons. Myriad more practical kryptonite delivery solutions have been devised by a helpful audience - ultimately, Doomsday was born mainly from forbidden Kryptonian technology and thus could be interpreted as representing a Kryptonian problem that requires a Kryptonian solution.
TL;DR - A lazy way to kill Superman and set up the sequel.
Wonder Woman is nowhere near as invulnerable as Superman. That's why she has to use those gauntlets. Without them, even something like a bullet can hurt her.
And although the kryptonite definitely weakened Superman. And given the kryptonite gas he had already inhaled. It made little difference if it was Superman or Wonder Woman to take it. Seeing Supes was nowhere near is top power.
But apparently he had to die. Against that wannabe Doomsday. So they made it so it was Superman to take the spear.
Which honestly he didn't had to take it. All he needed to do was give the spear to Wonder Woman, he would distract Doomsday, and when he had his back turned to Diana, she could've simply thrown the spear at Doomsday. If Doomsday tried to take the spear out, all Superman needed to do was focus his heat vision non-stop on Doomsday. Until Doomsday was dead.
But the movie was filled with plot holes! Like for example the kryptonite gas grenades. I mean, I would understand if Batman had made some special kryptonite gloves or gauntlets. But gas... All Superman needed to do was not inhale it. But strangely enough, we saw Superman basically sucking up all the gas. Like he was doing on purpose. And the first time he's caught with the gas grenade, okay. But the second and third times... Superman speed alone should have made the 2nd and 3rd attempts impossible. Like the 3rd grenade. All Superman needed to do was heat vision the grenade launcher, and that was it. But again, writers had to do their usual plot twists in favor of Batman.
Just like in the comics we see 8 out of 10 times Batman winning because the writer decides so.