According to the Magento Stack Exchange answer, UI components are used to render various
elements on Magento admin pages, such as grids, forms, buttons, etc. UI components are defined in
XML files that are located in the view/adminhtml/ui_component directory of each module. To add a
custom logic to render a column in a grid, the developer should create a custom class extending
MagentoUiComponentListingColumnsColumn and add the custom logic within the
prepareDataSource method. This method receives an array of data sources and modifies them
according to the column logic. The developer should also add an attribute class to the column node
within the module’s customer_listing.xml file and specify their custom class name as its value.
Verified Reference: https://magento.stackexchange.com/questions/317821/how-to-add-customlogic-to-render-a-column-in-a-grid-in-magento-2