Why am i not in the mood for sex

Lately, I’ve lost interest in sex. Does anyone know what causes this and how to fix it?