This is a dumb knowledge and a stupid way to get it.
After doing the main quests on 2 separate characters, I found out that this knowledge can be acquired by talking to the NPC "Yojin" while you have the quest "Rest in peace" activated but have not completed it. Make sure you get the knowledge before completing the quest. Otherwise you will have to repeat the whole main quests as me .