Does an ovarian cyst cause infertility?

Sometimes. Normal cysts do not cause infertility. Sometimes a cyst is actually endometriosis and that can lead to infertility. Sometimes if a cyst needs to be surgically removed too much normal tissue is removed.
Some do, most don't. Endometriomas are cysts from stage 3 or 4 endometriosis - most women with these have reduced fertility. If a cyst needs removal, such as a large dermoid cyst, the surgery may reduce ovarian reserve (lower egg numbers and quality). The most common ovarian cysts are follicular or corpus luteum cysts and don't cause infertility, but frequent follicular cysts can be a sign of reduced ovarian reserve.