It depends on what papers we are talking about.
I keep anything the tax authorities have the right to demand to see for the number of years they legally can go back and re-audit tax. How long that time is, depends on the country where you are paying tax, so beware if you have property abroad.
Receipts and guaranties for the length of time, usually two or three years ,they are valid.
Any documents relating to my house go into the folder with the papers we received from the estate agent when we bought the property. They will be needed when the house comes to be sold, whether I or my executor sells it. Receipted bills for repairs to the building go into that folder too for the same reason.
All the papers relative to the winding up of my husband's estate are in a folder along with my funeral plan, birth and marriage certificates etc and the receipts for the yearly payments for our grave plot as these too will be needed when I die.
I never rely on online documents, but print hard copies of anything relevant. After all, digital systems change, which might make it difficult or impossible to read older documents and has indeed done so in the past. Also the digital infrastructure can be hacked, disabled or simply crash,so where will we be if any of that happens and we have no copies?