Both parts should be mounted on the wall using command strips or something like that.
The bottom part should be placed at the correct height to hold your toothbrushes without the bristles touching the top piece.