I think Yamane has also been called Slovin on ResearchGate and is a misused shortcut that has been floating around, but if it's good for anything, it certainly isn't useful here.
This reminds me of the many Internet sample size calculators, most of which assume simple random sampling from an infinite population, for proportion data (at least that part relates here), for the worst case, p=q=0.5. But there are many, many other situations, even just in population sampling. In general, population sample size needs are influenced by methodology applied, population deviation, and desired accuracy. But there is no universally applicable formula.
You are interested in logistic regression. That is not my area of regression, but a quick look at the internet seems to yield some varying views on this topic. The bottom line would seem to be that you want to know what sample size is needed to attain a desired accuracy. As in the case of finite population sampling (or infinite ... so without a finite population correction factor) where you need a good "guess" at the population (or stratum) standard deviation(s), you have to have some idea of the variability you will encounter.
The little it has on sample size notes that for logistic regression, determining sample size needs is "complex." But it then gives you what I think is a vastly oversimplified approach. It does not even mention inherent variability in your data. From a great deal of work in finite population sampling and in linear regression, I'll tell you that that is going to be important.
Perhaps, after you have selected a sample, if some facet of accuracy proves to be inadequate, you might increase that sample size, if this is feasible and appropriate. (Will additional data collection be from the same source under the same conditions?) As is always good advice, you should plan ahead for that contingency.
Good, I see that "logistic regression" is one of the topics of your question. I thought I did not see that at first. You definitely need to keep that and "sample size" on your list, as you have done. I hope a logistic regression expert responds.
@Dhritikesh Chakrabarty thank you for pointing out the solution. Consistency property and law of large numbers helped to solve the idea. Yes more the number of sample less the sampling error.
Yamane (a.k.a. Slovin) has nothing to do with logistic regression, or perhaps anything. See https://www.researchgate.net/post/Who_is_Slovin_and_where_and_how_did_the_Slovins_Formula_for_determining_the_sample_size_for_a_survey_research_originated
Of course if 250 is enough, then 300 is enough. But the 250 number was arrived at bogusly.