Many people use the two abbreviations as if they meant the same thing, yet they cover different ground. UX (user experience) is about the whole journey someone takes on your website or app, which means what they look for, where they find it, how many steps it takes to buy, and where they get stuck. UI (user interface) is the visible part of that journey, the buttons, type, colours and icons, and the way they respond when someone clicks.
A simple example shows the difference. If a webshop only reveals the delivery fee at checkout and many people abandon their basket because of it, that is a UX problem, however good the interface looks. If the fee already shows in the basket, yet in such a pale grey that nobody notices it, that is a UI problem.
Why you need both
Without good UI, even the best thought-out process feels untrustworthy, because visitors judge how serious a company is by how it looks. Without good UX, even the most beautiful interface is just a shop window that people walk past before doing anything. That is why we keep the two in one hand. Research and wireframes map out the journey, and the UI shapes how that journey looks and works.
The industry often writes them together as UX/UI design, because in today's projects the two jobs are closely intertwined. In a small team the same designer is responsible for both, while on larger products a UX researcher and a UI designer work side by side. What matters to you is ending up with an interface where visitors get where you want them to go without having to think about it.
If you are wondering where to start, the order is almost always the same. First it is worth clarifying who your visitors are and what they want to achieve, and the visuals come after that. On an existing site a UX audit shows this in the shortest time, while on a new product the work starts with mapping the user journeys.
If an agency only promises UI, it is worth asking who will think through your visitors' journey. If it only promises UX, the question is who designs the final interface and who hands it over to the developer.