My pc was disconnected from the internet I keep trying to enter the security key number but it rejects it
Have you logged in to your gateway/router providing the WiFi to verify the security key? Are you sure you're selecting the correct WiFi network and not a neighbors? Did anything change with your PC before it lost internet, e.g. updates that might have reset WiFi settings?