Go to Google Images and type in "option time decay graph."
For some, the sweet spot is to sell at 30 days. For others, it's 45, 70, or 90. As a beginner, I think you'd be playing with fire by selling options with only a couple of weeks to expiration.