The social security website has a feature to allow you see the data that they have about your work history and your contributions and the contribution of you employers.
You will need to create an account on the website. The first step is to go to the section used to get your benefits estimate:
Get a benefits estimate
Check your account to see how much you or your family might get in
benefits payments.
Sign in to your account
See estimates for various benefits based on your earnings and when you
apply. You can also adjust expected future income to see how that
impacts your retirement estimate.
If you don't have a login account, you will need to create one.
That site will show you what you earned each year, and what you paid towards social security and medicare.
If there is a mistake, such as missing years or numbers that you think are wrong, you will have to go to the IRS website and get a tax history report to see what all your old W-2 forms said about your contributions.
Transcript Types and Ways to Order Them
Ways to Get Transcripts
You may register to use Get Transcript Online to view, print, or
download all transcript types listed below.
If you're unable to register, or you prefer not to use Get Transcript
Online, you may order a tax return transcript and/or a tax account
transcript through Get Transcript by Mail or by calling 800-908-9946.
Please allow 5 to 10 calendar days for delivery.
You may also request any transcript type listed below by submitting
Form 4506-T, Request for Transcript of Tax Return.
It looks like you would want this specific transcript type:
Wage and Income Transcript - shows data from information returns we
receive such as Forms W-2, 1098, 1099, and 5498. The transcript is
limited to approximately 85 income documents. If you have more
documents than that, the transcript will not generate. You’ll receive
a notification online stating that your transcript request could not
be processed and to complete and submit Form 4506-T. If you see a
message of “No Record of return filed” for the current tax year, it
means information has not populated to the transcript yet. Check back
in late May. This transcript is available for the current and nine
prior tax years using Get Transcript Online or Form 4506-T.
As was pointed out in the comments you might want to take a look at the Totalization Agreement with Canada