Here's more detail on "~다는 것".
It creates a noun clause from a full sentence, like "(the fact) that ...".
There is also ~(ㄴ/는) 것 which is very similar to ~다는 것.
* ~(ㄴ/는) 것: makes a simple and direct noun close.
- 나는 (몸이) 아프다: I am ill.
- 내가 아픈 것: The fact that I am ill.
- 내가 아픈 거 몰랐지?: You didn't know that I am ill, did you?
- 난 XX 사에 근무해: I work for the XX corporation
- 다들 내가 XX 사에 근무하는 것(을) 알아: Everyone knows that I work for the XX corporation
(* note the ~ㄴ 것 for adjectives, and ~는 것 for verbs, for the present tense)
* ~(ㄴ)다는 것: a more indirect version. Has a nuance of something heard or thought out. rather than a simple fact.
- XX 는 살기(에/가) 좋단다: XX is a nice place to live.
- XX 가 살기 좋다는 건 맞아.: It is true that XX is a nice place to live.
- 중앙 은행은 기준 금리를 내린다고 한다: They say the central bank will lower the reference rate.
- 중앙 은행이 기준 금리를 내린다는 소식이야: The news is that the central bank will lower the reference rate.
(* for ~다는, verbs carry their usual 받침 ㄴ(내린다) for present tense, unlike adjectives - it is not 내리는다는)
Of the two, ~(ㄴ/는)다는 것 seems to be generally preferred except in simple contexts.
There are also variants of the above for the special case ~이다 (is): ~(ㄴ/인) 것 vs ~(이)라는 것 as in 이게 사실인 것 vs 이게 사실이라는 것 (the fact that this is true).