People sometimes confuse the two, but UI is actually a specialized subset of UX. According to Figma Designer Advocate Hugo Raymond, engaging UI lays the foundation for a positive overall user experience with a digital product or website. "Effective user interface design brings together usability and interactive design to build an emotive connection between users and products," he explains.
I never knew UX was something and thought it was honestly just UI. But I see the difference is that UI is more for the pleasing effect for the users and that the UX is kinda the 'back-end' of UI