There are some small things you can do for
preventing UTIs.
I know a big contributition factor is forgetting to go to the bathroom before and after sex.
Because you've been getting frequent UTIs, then you should schedule an appointment with an urologist.
And as far as I know, your period will not affect your UTI; however you should schedule your appointment as soon as possible for antibiotics.