You can't *start* homeschooling at the *end* of a school year in the sense of suddenly switching from a traditional school mid-year and seamlessly continuing your education at home. The process of homeschooling usually requires paperwork, notification to your school district, and sometimes curriculum planning that takes time. These steps are generally not possible to complete in a short timeframe at the end of a school year.
However, you *can* begin homeschooling at the beginning of the next school year if you decide to do so before the end of the current year. You'd then complete the paperwork and arrangements during the summer break before starting the next academic year as a homeschooled student.