I think somewhere between 5-15 days is pretty generally accepted as the "fresh" period after roasting (caveat: except for espresso). Some people even freeze their beans if they don't think they'll start the bag soon enough after getting it, or if they get large bags.
You definitely _can_ make coffee with weeks-old beans (or months-old beans), but there's a distinct difference in taste when consuming shortly after roasting (after the degas but before it goes stale). According to [1] (random source among tons for a google search for "how long are coffee beans good after roasting"), beans aren't considered "stale" until around 30 days, but are definitely still usable; stale bread and flat sodas are edible too, but a lot of people prefer the better taste.
[1] https://making-nice-coffee.com/how-long-does-coffee-stay-fre...
I will grant that not very long ago, the fear of coffee going bad pretty quick was probably valid. But today packaging systems available to even the home roaster allow you to flush oxygen, displace C02, and/or vacuum seal.
I am not trying to argue that flavor stays the same for several months. But I call marketing BS on the warning that you have a week from when your beans were roasted to either enjoy them or to suffer the consequences.
We stock up on our family’s favorite coffee from Colombia three or four times a year, where relatives travel long distances to collect it for us from a non-exporting roaster.
Many months is a normal shelf life.