Zend certified PHP/Magento developer

Sort by price (with prices per customer groups applied) logic in Magento 2.4.5

Where i can find sort by price logic? I checked elastic search and the price is stored in the format: e.g. “price_1_1:10, price_2_1:15….” Where the first number after „price” is customer_group_id and the second number means price type. I can’t find where in the code is a logic which checks the customer_group and selects the right price for sorting. I’ll just add that it’s about sorting when we have applied prices per customer groups. And it’s magento 2.4.5. What i can see there is a lot of changes in comparision to <2.4 versions.