As a beginner, I wouldn't worry too much about this. There are good players who play with all kinds of techniques that others might find less than ideal. This is the kind of thing that you will revisit and change as you continue to play and develop.
That said, there are a few reasons not to anchor your pinky on the soundboard. I have heard some claims that anchoring the pinky to the top changes the sound of the instrument. This would probably only be significant on an acoustic instrument, and I am a little skeptical of this as a compelling reason to avoid such anchoring. Maybe on a classical guitar. But there are better reasons.
If you are using a pick when you play, anchoring the pinky may reduce mobility in your picking hand, or you may find that you have to switch your hand position when changing from picking single notes to freer rhythmic comping. Note that different tones can be achieved by picking closer to the bridge, or closer to the neck, but this requires mobility in the picking hand.
If you are playing in a finger-picking style, anchoring the pinky also removes one finger from the pool of fingers available for picking notes. That is, by anchoring you have three fingers and a thumb instead of four fingers and a thumb to play with. If you do try to use all four fingers when anchoring, you first have to pick up your pinky to get it into action, changing your hand position. Sometimes players use a pick, but also use the fingers occasionally to pluck individual strings, and you almost have to pick up an anchored pinky to play in this way.
The main advantage to anchoring the pinky seems to be that it provides a sort of reference to help you pick strings accurately. Some people allow the pinky to lightly touch the top of the instrument instead of firmly anchoring it. In this way the pinky can sort of slide around as the picking hand moves, improving mobility, and some feedback is provided to help keep picking accurate. This still has the disadvantage of requiring you to pick up the pinky and reposition the hand when you want to actually use your pinky to play. The best solution, in my opinion, is to avoid anchoring completely by allowing the picking hand to float over the strings. The palm or the heel of the hand can lightly brush the lower strings which aren't played (providing a palm mute), at the same time providing some feedback to help with picking accuracy.
Unrelated to pinky anchoring, but related to pinkies, often new players don't control the pinky on the fretting hand very well, allowing it to snap away from the fretboard when not in use. This means that when the pinky is needed to fret a note, it must move a further distance than it really needs to, and quickly, making accuracy more difficult. It is good to get into the habit of keeping all of the fretting fingers close to the strings so that they only need to move a short distance when they are needed.