W-2’s come from employers. There is not a federal or national website that provides W-2’s.
Some employers have payroll sites that will have your W-2. You might need to phone, drop in, email and/or snail mail an old employer to make sure they know where to send your W-2.
https://ttlc.intuit.com/questions/2561916-how-can-i-get-a-copy-of-my-w-2