Please read the passage:
Why should we say 捨てる日 and 捨てる所, but 捨て方？（方 is a noun too, just like 日 and 所）
Why don't they use 捨てるの日 and 捨てるの所？
As described in this question, a masu-stem (aka 連用形, pre-masu form) has a noun-like quality, and they can sometimes directly connects to another noun like a compound. デジタル大辞泉 defines this type of 方【かた】 as a 接尾語 (suffix), and 明鏡国語辞典 defines it as a 造語成分. This means 方 is somewhat special and it never follows an attributive form.
捨てるの所 is plain wrong in Japanese. You can join a verb and a noun using the plain grammar of relative clauses, and there must not be の between them.
So which noun can follow a masu-stem?
方【かた】 and 様【よう】 can follow the masu-stem of any verb. 様 is usually used as part of the idiom ～ようがない/ある.
Other nouns directly follow the masu-stem mainly as part of fixed expressions.
masu-stem + 時【どき】 means "suitable time for ～ing", "good chance for ～ing".
masu-stem + 所【どころ】 roughly means "point of ～ing".
masu-stem + 物 roughly means "thing to ～". You basically have to memorize them individually.
You usually cannot say ゴミの捨て所 or ゴミの捨て時 unless you're speaking jokingly.