gokigen.jp/toiuwakeda-meaning-usage-thats-why-no-wonder-and-so-you-mean-in-japanese/
A grammar lesson on ~(という)わけだ that covers its two main meanings: expressing "that's why" or "no wonder" when understanding reasons, and "so you mean" when confirming someone's statement.