The most common approach is steganography or image manipulation. Try opening the image in any basic editor (even the built-in Paint will do) and play around with contrast, brightness, and saturation. Sometimes the code is hidden in barely noticeable pixel differences that become visible if you crank the contrast up to maximum. Another option is to save the image and upload it to some online image processing service like Pixlr or similar alternatives - they often have ready-made filters for revealing hidden content.
But the code isn't always in the image. The riddle text itself sometimes has letters encrypted as first letters of words, or digits hidden as Roman numerals, or you need to count something specific (letters, symbols, pixels). Read the quest conditions carefully - there might be a hint like "count only red pixels" or "look at the corners." It also happens that the code depends on the time you sent the message or the attempt number.
If nothing works, take a screenshot and post it on some puzzle enthusiast forum or in a Discord community - people with experience in solving these quests will help point you in the right direction. The main thing is don't assume it's a simple typo or bot error - in Telegram quests, everything is usually done intentionally.