I suggest you look into the concept of statistical power (I.e., the ability to detect an effect), and more specifically into the g*power program which translates your desired level of power into a sample size.
You could use any of the several online calculators available for calculating sample size in medical research experiments. These calculators typically allow you to input parameters such as effect size, significance level, power, and expected variability, and then they provide you with the recommended sample size. An example is referenced below.
Kane, S. P. (2019, July 24). Sample size calculator. Clinical tools and calculators for medical professionals - ClinCalc. https://clincalc.com/stats/samplesize.aspx?example
As David Morgan says, you need to look into the concept of power and how it relates to your experimental design and the appropriate statistical test for your setup. Once you have decided on what you are testing and what the appropriate statistical test is, calculating power should be fairly straightforward, possibly using one of the programs others have suggested.