The 22-year-old joins the Tinners on a permanent basis in June 2024 after spending time on loan with City last term.
Sanders, who started his career at Premier League side Nottingham Forest, made 27 appearances for Truro in 2023-24 and scored one goal, in a 2-1 victory away at Chelmsford City.
He first joined York City on loan from Forest during the 2021-22 campaign and helped the Minstermen to National League North promotion, under the management of recently appointed Truro chief John Askey.
The temporary switch from the City Ground was then made permanent in July 2022 with York playing at Step One. Sanders made a total of 20 National League appearances in 22/23 before he moved on loan to Boston United.
Back at York for the start of 23-24, Sanders was the subject of another temporary switch to Truro and after a string of accomplished performances as City kept hold of their National League South status, he became the first signing for new boss Askey.