You have learned how to find minimum spanning trees using Kruskal's and Prim's algorithms. Both build the MST by greedily selecting edges, but they use different strategies. Kruskal sorts edges and uses Union-Find to avoid cycles. Prim grows a tree from a starting node using a priority queue.
Both run in time or better. You have solved three problems: Road Reparation, Min Cost to Connect All Points, and Building Roads. Next section: shortest paths.