When you place an order (buy or sell) on Trade Republic, it passes that order onto to a broker/exchange for execution and it gets paid by the broker/exchange for giving it the order. The broker/exchange then finds a seller/buyer for your order and executes it.
The transaction price you pay will be different from one broker/exchange to another - it is the price that someone else was prepared to offer/pay on that particular exchange.
Whether you got the best price available is unknown - in theory you could have looked at the price available on all exchanges but as the prices vary by the milli- or even micro- second these days who knows?
The paper referred to above was commissioned by Trade Republic and shows that you did better most of the time using Trade Republic (surprise, shock, horror!)