Flesh to Stone
You attempt to turn one creature that you can see within range into stone. The target makes a Constitution saving throw. On a failed save, it has the Restrained condition for the duration. On a successful save, its Speed is 0 until the start of your next turn. Constructs automatically succeed on the save.
A Restrained target makes another Constitution saving throw at the end of each of its turns. If it successfully saves against this spell three times, the spell ends. If it fails its saves three times, it is turned to stone and has the Petrified condition for the duration. The successes and failures needn't be consecutive; keep track of both until the target collects three of a kind.
If you maintain your Concentration on this spell for the entire possible duration, the target is Petrified until the condition is ended by Greater Restoration or similar magic.
Flesh to Stone 5e 2024 vs. 2014 edition differences
The 2024 version specifies the target automatically succeeds on saves against constructs, and grants the Restrained condition on a failed save, with Speed 0 until your next turn on a success. The 2014 version requires the target to be flesh and petrifies after three failed saves, with no mention of Speed or automatic succeed.