Focuses on Problems. UX designers take all relevant context as input such as customer pain point, technology literacy, and livelihood and turn into the functional user experience. UX work is invisible to the eye. It's when you feel, "wow this is so intuitive".
Kind of like an architect planning and building a house, where they consider the terrain, weather, and sunrise angle. Yes, an architect makes good UX designers.
Focuses on Solution. UI designers are in charge of the visual aspect like buttons, layout, colors, fonts and images. UI designers master the psychological aspect of design, and uses mathematics to aid design.
In construction analogy, UI designers are like Interior Designers, in charge of the living aspect like furniture arrangement, wall colors, door knobs etc.
It takes years of practise to perform both admirably. Pick one now, master it and stack those skills in the future. The easier route is UI first.