It’s not sinful. If the side effects bother you, there are other options. Up to you.
It’s for medical purposes, you’re not married plus you are not having sex (I’m only assuming!). There shouldn’t be any moral dilemma.
Is a guy trying on a condom ( just for the fun of it, without having any sex) committing the sin of using contraception? (Ok nobody does this, but you get my point) so why would you, a person using the pill for health reasons be sinning?