Solomon is now king of Israel, so he asks God to make him wise enough to judge his people.
His first case makes no sense. Two women share a house and both have young baby boys. One baby dies in the night as his mother smothers him accidentally in bed. She then swaps the corpse of her baby with the living baby of her housemate. Which is bad enough, but mow there is an argument with them both claiming the living baby as their own.
Solomon's judgement: Cut the baby in half and give each of them a half. Baby's real mother immediately says the baby should go to the other woman to keep it alive, but the baby stealing woman who lost her actual baby says 'sure cut him in half'. All I can think is that the loss of a baby so soon after giving birth has driven this woman a little potty, because surely no sane woman who wants a baby would say that. But Solomon sees their reactions and gives the baby back to the real mother, mainly because the other woman wants to cut the baby in half, never leave a baby with someone willing to do that!
So apparently that is sufficient to show off Solomon's new God-enhanced brain powers, and everyone is scared of how clever he is, or maybe they are frightened of someone who solves disputes by threatening to brutally murder babies...