I haven’t played BG1 or BG2, but so far I haven’t felt that BG3 requires prior knowledge in order to understand the story. As for DND knowledge, the only things I know about the game are from the bits and pieces that I glean from watching Critical Role. BG3 is doing a wonderful job filling in the missing pieces of knowledge with really handy tooltips and descriptions of how everything works. If anything, it’s probably the most interesting primer to DND I’ve ever encountered.