The IRS has nothing to do with the social security eligibility, in only collects the taxes.
You earn SS credits based on the earned income subject to FICA/Self Employment tax. FICA is the payroll tax for those employed by an employer (colloquially called "W2 employees"). Self Employment tax is for those who are not W2 employees, colloquially called "1099 employees" or "contractors", or people who work for their own business (sole proprietors, or self employed through a disregarded entity). You don't need to file a separate 1040, you only file one. Schedule SE is part of that form.
If you have Schedule SE attached to your tax return, check the line 8d. If you are a W2 employee check box 3 on your W2. These are the amounts qualifying for credits, you need to have at least $1730 for each credit, and you can earn up to 4 credits per year (see here).
But, importantly, Canada has a totalization treaty with the US. So you might qualify for US Social Security based on your employment in Canada. You'll need to check with someone more familiar, I suggest starting with a US-licensed CPA or contacting the SSA directly.