I was looking at the Wikipedia entry for Prim\'s algorithm and I noticed that its time complexity with an adjacency matrix is O(V^2) and its time complexity with a heap and
I think you read it wrong to some degree.
For dense graphs, the article talks about using Fibonacci heaps with time complexity O(E + V log V), which is significantly better.