The short answer is, you can't prevent the distortion in the material if the material wants to distort, but you can switch methods to avoid the consequences. And 100% absolutely do not attempt to force a board that has bound up through the table saw. To do so would be to court a kickback. Stop feeding and turn off the saw immediately while retaining control of the workpiece. Once the saw is safely stopped, proceed to Plan B.
While not a good thing, having the kerf close up and bind the riving knife--or much worse, the blade--is a situation most every woodworking has, or will, encounter at least occasionally and understanding what's going on and how to deal with it is very important. As noted by others, there can be various causes but the most common is that solid wood isn't a 100% uniform material and boards sometimes contain internal stresses that cause the kerf to close up, or, alternatively, splay out like a Y, and the workpiece to bow or twist a little, as the board is cut or machined. Some species are more apt to act up than others, and construction lumber, which is grown fast and dried not so carefully, is especially prone. It's definitely unusual that you've had this experience twice in a row, but stranger things have happened.
In terms of Plan B, there are a few options. The best/easiest is to switch to the bandsaw and use that instead, to make rough rips, which you would subsequently clean up with a pass to the final width on the table saw. If you don't have a bandsaw, you could use a jig saw to accomplish the same thing--it will be slower, but the principle is the same: even in ill-behaved stock, the comparatively narrow band saw/jig saw blade won't generally bind up and even if the kerf closes up, the stock will not kick back, which is the danger of things with circular blades like the table saw. Another option is to stick with the table saw but only after inserting a small strip of wood that's the same width as the blade, or a hair wider, to force the kerf back open and eliminate the binding. My advice is that you eschew this last option, however, until you get a little more experience, since it involves starting up the saw with the stock already in contact with the blade.
Bottom line: This is a step on everyone's woodworking journey--and doing = learning.