Time spent on the Youth Mobility Scheme Visa does not count towards ILR. However, it does provide you with the platform to showcase your skills to UK employers, which could lead to sponsorship on a Tier 2 Skilled Worker Visa. This path could then lead to permanent residence and, in time, British Citizenship.