It’s not really a question of “better” but of which is more appropriate to the kind of bicycle. The big advantage of disk brakes is when it’s wet, because they clear water more quickly. As a result, they’re popular on mountain bikes. In competitive road racing, they make changing wheels quicker in the event of a puncture. However, they’re complex and heavier than rim brakes. Rim brakes are cheaper and are still an efficient way of stopping a bike, so they remain popular.