At the most basic level, the user interface (UI) is the series of screens, pages, and visual elements—like buttons and icons—that you use to interact with a device is focused on how a product’s surfaces look and function is concerned with the visual appeal of the product. UI focuses on making it more visually appealing, and more comfortable for a user at an emotional level.
User experience (UX), on the other hand, is the internal experience that a person has as they interact with every aspect of a company’s products and services. UX is focused on the user’s journey to solve a problem. UX is primarily concerned with the overall functionality of your product as of whole.
I am giving you one snapshot here for better understanding regarding these both: