UI refers to the screens, buttons, toggles, icons, and other visual elements that you interact with when using any website, App, or other electronic device. UX refers to the entire interaction you have with a product, including how you feel about the interaction.
User interface is important to meet user expectations and support the effective functionality of your site. A well-executed user interface facilitates effective interaction between the user and the program, app or machine through contrasting visuals, clean design and responsiveness.
UX design is researching and planning out how the user will experience a product. Could an application be more usable ? How user-friendly is the design ? These are the broader questions that a UX designer should be focused on. Everything in UX design is centered on the user, as they are the most important part.