A client meeting once made this difference very clear. Their website had nice colors and modern buttons, but users still failed to complete a booking because the steps were in a strange order. That was a UX problem, not just a UI problem. I later sent the team
https://triare.net/insights/difference-between-ui-and-ux-design/ because it explains the split simply: UX is about product logic, user flow, and how easily people complete actions; UI is about the visible interface, like fonts, buttons, colors, and visual details. I would share that page with non-design teams because it prevents wrong fixes. If the path is confusing, repainting the button will not solve it. If the path works but looks unclear, then UI needs attention.