What is the role of sample size in the calculation of confidence intervals?

Frankfort-Macadamias and Leon-Guerrero (2018) noted that the precision of a confidence interval can be enhanced by increasing the sample size.

What is the role of sample size in the calculation of confidence intervals?

What factors might determine the size of an ideal sampler in your  study?