One-dimensional systems exhibiting a continuous symmetry can host quantum phases of matter with true long-range order only in the presence of sufficiently long-range interactions. In most physical systems, however, the interactions are short-ranged, hindering the emergence of such phases in one dimension. Trapped-ion quantum computers provide a pristine one-dimensional spin system, featuring high isolation from the environment, high-fidelity measurement and preparation of individual spins, and fully connected spin-spin interactions. Particularly with simultaneous control over an array of tightly focused individual-addressing laser beams, we can tune the strength and range of spin-spin interactions and local magnetic fields at each spin. We use such a precisely controlled one-dimensional spin system to prepare many-body states with long-range spin order that extends over the system size up to 23 spins, which is a characteristic feature of the continuous symmetry breaking phase of matter. We further study the phases at different ranges of interaction and the out-of-equilibrium response to symmetry-breaking perturbations.