Check in this order 1. Is the server online? The status page on this site answers that in one glance. 2. Are you whitelisted? Your dashboard shows your status. A pending application cannot connect. 3. Restart FiveM completely, then GTA V, then your PC. This resolves more cases than anything else. 4. Clear your FiveM cache: delete the "cache" folder inside your FiveM application data directory. Do not delete anything else. 5. Try a different network if you can — some ISPs and school or work networks block the ports FiveM uses.
If none of that works, open a support ticket and include your FiveM console output (press F8, screenshot it).