Yes, you could.
You actually have to go inside the Galar Mine No. 2 before the third Gym. You go in there to find Kabu, the Fire Type Gym Leader before you actually challenge the Gym. If you don't, you can't challenge the Gym.
I hope I helped!