Skin Deep by Brandon Sanderson

In "Skin Deep," a novella set in a futuristic world, a detective named Stephen Leeds, also known as "Legion," uses his unique ability to manifest multiple personalities, each with their own specialized skills, to solve complex mysteries. When a biotech company hires him to recover a missing corpse that holds a groundbreaking secret, Stephen and his diverse team of hallucinations delve into a web of intrigue and danger. As they navigate corporate espionage and ethical dilemmas, Stephen must confront his own mental challenges while racing against time to prevent a potentially catastrophic outcome.