From my limited experience purchasing USPS stamps this is how their availability diminishes:
a) If you get the catalog (and you can call to have a hard copy mailed to you) you will be able to pre-order some stamps in certain formats (usually full panes, possibly for a few stamps an imperf or perf press sheet)
b) The next phase is the stamps show on the USPS site ahead of their release for pre-order.
c) Upon release the stamps begin to be available at post offices. If your post office has a small inventory ask them if there are any ones with ample stock of stamps (older staff may refer to them as philatelic centers which usually carried most or all of the current inventory of USPS stamps and were the main way to get them before online ordering replaced it).
d) If you can, ask for the USPS Philatelic Catalog or at least check the online one. It offers in the fine print indicators of when a stamp will no longer be sold or those which you could customize an order (e.g. say you want a pane of 4 with the plate number showing). One example of its notifications given in the catalog, by the end of September the First Class Mail Forever Thank You Stamps will no longer be for sale. Already these stamps are hard to find at several of my local post offices, the only resource seems to be through online or catalog order.
e) Once a stamp is no longer sold online, you have to go to the secondary market or see if the post office happens to have some extras remaining (usually they do for the low value stamps, not for first class mail and higher denomination stamps).
f) One warning when buying stamps. Many sellers on
eBay will charge a higher rate than what the USPS is concurrently selling for the same stamp!!!!! This is true for other secondary dealers unless they have a contract with a country/territory to sell their stamps at face value.
As a PS. the USPS Philatelic catalogs are lovely items themselves and fun to peruse.