Because you can learn as you go, you don’t need any experience to do independent research. You do need certain skills. At a minimum, (1) strong abstract reasoning skills (2) intermediate to advance skills in your target programming language (3) familiarity with algorithms, operating systems, and libraries and (4) intermediate to advance math skills.
Does your school offer AP Research or a similar class? That class provides a structured environment for high schoolers to conduct independent research culminating in a research symposium. At our high school, science fair participation was a mandatory component and students also often used work completed in the class to apply to competitive summer research programs.