If something belongs or pertains to you, accept it. This proverb first appeared as “if the cap fits,” which may have referred to a fool’s cap. The later version has become more common and is associated with the glass slipper in the fairy tale, “Cinderella.”
Also, if the cap fits, wear it. If something applies to you, accept it, as in These problems are hard to solve, and most people would need help, so if the shoe fits, wear it! This expression originated as if the cap fits, which alluded to a fool’s cap and dates from the early 1700s. Although this version has not died out entirely, shoe today is more common and probably gained currency through the Cinderella fairy tale, in which the prince sought her out by means of the slipper she lost at the ball.