This may be the same question as Novel about a digital consciousness overtaking a person slowly, but enough is different that I'm not certain. It's a book, maybe originally a play, about a teenage boy, socially awkward, who gets a chip in his brain that makes him more socially able, but it's gradually implied (and eventually explicit) that the chip is taking him over. The title, I think, had the word "Cool" in its title, like "Becoming Cool". I thought I read a TV Tropes entry about it, but I can't find it now.
1 Answer
Might you be thinking of Be More Chill? The description on Goodreads says it's also a play:
Jeremy Heere is your average high school dork. Day after day, he stares at beautiful Christine, the girl he can never have, and dryly notes the small humiliations that come his way. Until the day he learns about the "squip." A pill-sized supercomputer that you swallow, the squip is guaranteed to bring you whatever you most desire in life. By instructing him on everything from what to wear, to how to talk and walk, the squip transforms Jeremy from Supergeek to superchic. Now an off-Broadway musical!