You probably have edited the the schematic symbol in Sch library after placing its footprint on the layout design.
In situations like this, you need to update your schematic design from library (Tools/Update From Libraries...), then update your PCB with the updated schematic. If problem still there, remove the footprint from PCB file and update the PCB file with schematic again.
Also make sure the symbol in schematic sheet has the same footprint model name as it has in Schematic and PCB libraries.
Some said create vias to the ground planes. But should I do that for every pin?
Through-hole pads don't need another via --- they already extend through the board to all layers.
For SMT, one via per pad is a starting point. Each component probably has its own current draw so you want to have enough vias to accomodate that. But you might find cases where it's not needed. For example, a bypass capacitor next and the power pin for an IC placed near each other probably can share one via.
Because sometimes when I create via to each component then route their connection on the ground plane, the net line doesn't disappear all the time.
Generally I hide the ratsnest lines for power and ground pins during the initial part of the design. Then they don't clutter things up while you're routing the signals. Once signals are routed, turn the power and ground net ratsnest back on. As you connect each pad to the planes, you should see one netline disappear. It might not be the one you expect, but by the time you connect all the pads to the planes, they should all be gone.
Then other sources say create polygon pours after the connection is done.
Altium distinguishes polygon pours from plane layers.
Polygons are positive features on positive (signal) layers, that fill large (or small) areas.
Plane layers are negative layers where copper is present on the entire surface, except where features are defined. If you make a polygon on a plane layer, you will produce a region with no copper, not a region with copper.
Making polygons last is mainly a convenience: Redrawing polygons can take a long time, and you don't want to be waiting for it to happen all the time during your design, so you draw your polygons last to avoid that inconvenience during most of the design process.
Best Answer
In "connect to" you should write the net name, not the pin number.