Technically, stimulus payments are an advance on a tax credit for the 2020 tax year. The IRS calls this credit the Recovery Rebate Credit. Unlike a tax deduction, which reduces your taxable income (and therefore your tax payment), a tax credit reduces the amount of tax you owe, dollar for dollar. Even better, and unlike most credits, the Recovery Rebate Credit will give you money back even if it's more than the tax you owe or paid. For example, if you owe $700 in federal income taxes for 2020, a $1,200 stimulus tax credit would net you a $500 tax refund.
You need to file federal tax form 1040 or 1040-SR for 2020 to claim your Recovery Rebate Credit. You'll also need your IRS Notice 1444, the letter the IRS should have sent to you a few days after you got your first stimulus check, and IRS Notice 1444-B, which you would have gotten after your second stimulus check. If you didn't get a stimulus check, you don't need either notice.
You can file a 1040 or 1040-SR even if you didn't earn enough income to require filing a federal tax return. If you earned no money in 2020, simply put down zero as your income on Line 1. Then proceed to the Recovery Rebate Credit worksheet on page 59 of the instructions for the 1040 or 1040-SR, where you can figure how much money you're entitled to for the credit. Remember, even if you owed no taxes or paid no taxes in 2020, you still might be eligible for the first and second stimulus payments, as well as any payments for eligible dependent children.
The worksheet for the credit will tell you whether you're eligible, and how much more you're entitled to if you didn't get the full amount. Although the one-page, 21-line worksheet looks intimidating, it essentially walks you through calculating whether you're entitled to a stimulus credit, and how much that credit is. The amount from the Recovery Rebate Credit worksheet goes on line 30 of your 1040 form. If you aren't entitled to a Recovery Rebate Credit, leave line 30 blank.
You have nothing to lose by filing a tax return for your stimulus payment. The credit won't increase your taxes or reduce your refund. The second stimulus payment can't be seized by creditors or garnished by the government for nonpayment of child support. And, the IRS says, if your adjusted gross income is less than $72,000, you can use its Free File service at no charge to calculate your credit and file a tax return electronically.