If you are the buyer, you are losing all premium you paid for, when it expires worthless. If you are the seller, you keep it, as you don't have to pay back the premium (and maybe more) that the buyer paid you for, when it expires worthless.
When you sell a put, is there a rule of thumb for when you should buy to close? I know I can let them expire worthless weeks or months in the future, but I'm thinking about the percentage of the premium received vs. the percentage of time elapsed.
If you sell a put on, say, AMZN at 100, and AMZN drops to zero, there is no expiring worthless for you. You are buggered, and bankrupt. I know nothing about options, but I know that much. You are asking the wrong questions.