My house's so-called master bathroom is very small. To make it more pleasant and usable I chose a pocket door and wall cabinets to open up the floor space years ago. A pedestal sink also helps the spaciousness, though I now have no counter top.
That sacrifice proved worthwhile, though toothbrush storage plagued me all this time. Holders all tend to be over-sized with multiple slots not needed here. We are only two.
Then an online search brought me to the Flipper brand. Two suction cups secure the individual holders to our medicine cabinet mirror as you can see here:
What you cannot see here is how seams in the animals' bellies part to allow easy removal of the brushes. They pop back into storage with equal ease, a simple press toward the mirror closing them securely.
I used rubber cement to ensure they stay in place. And so far, I am thrilled with the neat solution. If you would like to read more, you can check out the website here:
Flipper Hygienic Toothbrush Holder
There are numerous styles (I wanted a cow to accompany the pig but my partner liked the lion too much). Just be warned that these cute critters seem available only online in the United States.