There's restrictions on spells in D&D, becuase they're more powerful than a sword swing.

a) You have to memorize spells, i.e. decide which spells you have available. In tabletop this is done once per day and then you have those spells available the entire day, and can't switch. In BG3 you can change them whenever

b) You have to have spell slots available. You can cast only a certain amount of spells of each level. You can always cast a lower level spell in a higher spell slot, sometimes with benefits. When you're out of spell slots, you have to rest.