I have to say that the Baldur’s Gate games are some of the best that that genre has to offer - based on DnD rules they are excellent. They inspired much of Divinity They may be a little old at this point but the remasters hold up very well. There’s a third game currently in open beta which has actually been developed by Larian - the developers of Divinity - as they did such a good job.
Alternatively there’s Pillars of Eternity, which is also pretty great. That’s also heavily inspired by Baldur’s Gate and dnd.