If you look at Cochran's book, he briefly derives what is in the sample size chapter. That is for simple random sampling and for continuous data, and separately for proportions. If you search on related terms and include "Pennsylvania State University" in the search, you will find material on this, often, I think they say, from Steven Thompson's book. Other chapters in Cochran give hints on other designs, and then there are model-assisted and model-based methods discussed largely in other books and papers/articles.
It seems that often on ResearchGate you will hear of someone using a "formula" by some name that turns out just to be a special case of what Cochran has for simple random sampling, likely for proportions (yes/no data). If you don't have a copy of Cochran's 3rd edition (Wiley, 1977), then see what Penn State has online, as noted above. (Cochran's first edition is interesting too, but the chapter you want is in the 3rd edition.)