Calculating Estimated Taxes

I am retired and collecting Social Security but have been working part-time as an independent contractor.  Although I had been paying my taxes in full when I filed my previous returns (2014-2021), last year (2022) for the first time I was penalized for failing to file estimated taxes, so I began paying them this year.  My question is about calculating the estimated payments.  Should my calculation be based on when I earned the income or when I actually receive payment for my services?