You may think that making the crying stop will also stop your child (and your heart!) from hurting, but when you tell your toddler, "Stop crying!" or "Don't cry!" they'll immediately think that you don't understand how they're feeling. Their message is therefore likely to become louder and more persistent.
By asking or telling them to "stop," you're also telling your child that their emotions are invalid and unimportant. Regardless of how trivial the reason may seem to you, your failure to acknowledge how they are feeling in that moment deprives both of you of the opportunity to learn how to process that emotion in a more positive way.
Our goal as parents, no matter how tricky it can seem, is to support our little one's development of emotional self-regulation — something we can only do when we treat them with empathy and understanding.