When we purchased our house a year ago, I replaced all the burnt out lights throughout the house. 2 of the recessed lights in our master bath were out but within a couple months of replacing them they went out again. Our light switch does have a dimmer so I chalked this up to not buying bulbs that were dimming compatible and since we didn't really need them i just never replaced them again. A few months ago the other 2 recessed lights started flickering anytime they were turned on and then eventually would turn on for a few seconds and then immediately go out. I tried replacing the bulbs, making sure to get dimming bulbs, and flipping the breaker but neither fixed the issue. Our vanity lights, vent fan and all the outlets work in the bathroom no problem.
What are some next steps I can take to try to find the root cause before calling in an electrician?