Three common causes:
- An out of date IDE. Solution: make sure your IDE is up to date
- If you’re not properly signed in to GitHub CoPilot. Solution: make sure you’re signed in to GitHub CoPilot
E.g. In VSCode look on the bottom left, if you see this, you might not be signed in:

Click the icon, and follow the prompts to sign in, then CoPilot should work.
- Try closing and reopening your IDE (e.g. vscode), that may also help.