Two related things.
WHAT UX MEANS
The whole experience of using something: whether it solves the problem, whether it can be understood, whether it is worth the effort.
WHAT UI MEANS
The interface itself: what appears on screen and how it behaves.
WHY THE DISTINCTION MATTERS
A beautiful interface to a service that does not solve the problem is a failure.
A plain interface to something genuinely useful is a success.
WHAT UX WORK INVOLVES
Understanding who uses it and why Deciding what it should do Structuring it so it can be navigated Testing whether people succeed
WHAT UI WORK INVOLVES
Layout Typography and colour Components and states Consistency
WHAT THEY HAVE IN COMMON
Both are decided by whether people can do what they came to do.
WHAT NEITHER IS
Decoration.
WHAT TO ESTABLISH BEFORE DESIGNING ANYTHING
What the person is trying to accomplish.