The most common, and straight forward way is to use a flexible coupler. These typically have two different bore configurations: Where bore A would be something like 5mm (to fit a nema17 stepper motor shaft) and bore B would be 8mm (to fit an 8mm threaded rod). But they come in a variety of configurations.
I have seen DIY solutions where you use a piece of clear plastic tubing (from a hardware store) along with two hose clamps.
I prefer the flexible couplers. You can generally pick them up for between $5-$10 each.
If you’re looking for a suggestion of somewhere to buy them, let me know. In the true spirit of this group, I don’t want to seem like I’m spamming the list with links to my store