Ranieri is the product of ACF Fiorentina youth teams and started playing for their Under-19 squad in the 2015–16 season.[2] Late in the 2017–18 Serie A season he made several bench appearances for Fiorentina's senior squad, but did not see any time on the field.[3]
Loan to Foggia
On 16 July 2018, Ranieri joined Serie B club Foggia on a season-long loan.[4] On 26 August he made his professional debut in Serie B debut for Foggia as a 77th-minute substitute for Emanuele Cicerelli in a 4–2 home win over Carpi.[5] One month later, on 27 October, Ranieri played his first match as a starter, a 2–2 home draw against Lecce, he was replaced by Giuseppe Loiacono in the 69th minute.[6] Three days later, on 30 October, he played his first entire match for the team, a 1–1 away draw against Cittadella.[7] Ranieri ended his season-long loan to Foggia with 29 appearances, including 26 as a starter, and 1 assist.[8]
Loan to Ascoli
After having made his Serie A debut for Fiorentina, on 31 January 2020, Ranieri was loaned to Serie B side Ascoli until the end of the season.[9] On the next day he made his debut for the club in a 3–0 away win over Livorno, he was replaced by Erick Ferigra in the 93rd minute.[10] On 21 June he played his first entire match for the club, a 1–0 home defeat against Perugia.[11] Ranieri ended his 6-month loan to Ascoli with only 10 appearances, including 9 as a starter.[8]
Loan to SPAL
On 25 September 2020, Ranieri joined Serie B club SPAL on loan until 30 June 2021.[12]