A pillow’s effect on your toddler’s posture depends on the pillow you use.
We would not recommend using an adult-size pillow for a toddler.
This will likely be too high for the toddler, putting a strain on the neck and spine.
Instead, opt for a toddler pillow that is low enough to keep the neck and spine neutrally aligned.