The fix is usually about moisture and airflow, not the window itself. Open trickle vents if you have them, avoid drying clothes in the bedroom, keep curtains away from the glass overnight, wipe water off each morning, and use a dehumidifier if humidity stays high.
Ventilate the room, wear gloves and eye protection, and clean the patch with a mould remover labelled as suitable for painted surfaces. Wipe it down as directed and dry the wall fully. Do not repaint until the mould is gone and the wall is completely dry.
Mould usually comes back after cleaning because the surface has been treated but the cause has not. In UK homes, the usual causes are condensation, poor ventilation, cold external walls, furniture pushed tight against walls, leaks, or damp materials that never fully dry.