There's no one-size-fits-all answer pointing to which type of swingaret. Babies can have their own preferences, which will be one of those things where one baby may prefer side to side while another prefers front to back. Remember that a swing for your baby is optional, and some babies may not like a swing!
Front-to-Back: This offers a rocking sensation that many babies find comforting. This motion replicates the gentle rocking you might use to lull your baby to sleep. The back-and-forth movement can have a calming effect, particularly for newborns accustomed to the swaying motions they experienced in the womb. A front-to-back swing is preferred if your baby falls asleep or relaxes more easily with a rocking sensation.
Side-to-side: This mimics the soothing sensation of being cradled in your arms. This motion is often favored by babies who find comfort in gentle swaying. A side-to-side swing might be great if your baby enjoys rhythmic movements.
Some swings also offer both, such as this one by FisherPrice.
No matter which motion you choose, safety is paramount. Always read and adhere to the manufacturer's guidelines for assembly, installation, weight limits, and usage recommendations.
Place the swing on a flat and stable surface, away from hazards like cords or curtains, and never leave your baby unattended in the swing.
Photo by: @aliciamechani