Prim's algorithm uses a priority queue (min-heap) to find the cheapest edge crossing the cut. The priority queue stores edges (or nodes with their edge weights). Start with one node in the tree. Add all its edges to the priority queue.
Pop the minimum edge. If it leads to a new node, add that node to the tree and push all its edges. The priority queue ensures you always pick the globally minimum edge crossing the current cut.