The Golem And The Djinni by Helene Wecker

In turn-of-the-century New York, a newly animated clay golem and a displaced djinni, each stranded in unfamiliar human bodies and immigrant communities, form an unlikely friendship as they hide their true natures, navigate love and loneliness, and confront questions of identity, belonging, and the cost of freedom while ancient forces and cultural tensions threaten to expose and destroy the fragile lives they are trying to build.