Nevermoor: The Trials of Morrigan Crow by Jessica Townsend
Morrigan Crow is cursed. Born on the wrong day of the year, she is supposed to die on her 11th birthday. But a mysterious stranger named Jupiter North shows up one day and whisks her off to a magical city called Nevermoor. Once there, she finds that her savior is part of a secret group known as the Wundrous Society, which holds a competition ever year to recruit new members. Morrigan has been chosen to enter this competition, where she must complete four difficult and potentially deadly trials to earn her place and remain in the safety of this new, strange place. If she fails, she will be returned home to face her own doom.