Every point on a candle flame sends light out in all directions, and every one of those rays that passes through a lens is bent toward the same image point. You do not need all of them. For a converging lens, three rays have paths you can draw without measuring any angle: a ray parallel to the axis bends through the far focal point F; a ray through the center of the lens goes straight on; a ray through the near focal point comes out parallel to the axis. Draw any two from the top of the candle, and where they cross is the top of the image.
Try it with f=10 cm and the candle 30 cm from the lens. The parallel ray drops through F, 10 cm past the lens; the center ray keeps the downward slope it came in with. They cross 15 cm past the lens, below the axis, at half the candle's height. So the image is real, inverted and half size, the same answer the thin-lens equation gives.
If the rays leave the lens spreading apart, they never cross on the far side. Then you extend them backwards as dashed lines until they meet; that crossing is a virtual image, on the object's side of a lens or behind a mirror. A sketch of one beam bending at a window pane is not a ray diagram in this sense: there is no image to locate, only a direction, and Snell's law or the law of reflection is all you need.
Think of it like this. Locating an image with two principal rays is like fixing a ship's position from two lighthouses: each sighting gives one line, two lines cross at one point, and a third sighting checks it. Unlike a ship, the crossing point may be virtual, found only by extending the lines backwards behind the lens or mirror.
Core idea. Two or three rays with fixed paths (parallel then through F, straight through the center, through F then parallel) are enough to locate an image: it sits where they cross, or where their backward extensions cross.