There are a few actions to take to avoid potential needlestick incidents.
First, the easiest way to avoid a needlestick injury is not to use them if they are not necessary! If alternative methods are available, use those! Using needles is an invasive procedure, as their use breaks the skin, the body's natural barrier to potentially harmful pathogens of the external environment, so nurses should only use them when safer options are unavailable OR the pros of using a needle method outweigh the potential cons.
Nurses can use the scoop method to get needle caps back on syringe, rather than placing it the cap in their non-dominant hand and attempting to aim the needle to cap. It is an unnecessary risk to take when placing the cap on a flat surface and scooping it with the bevel and cannula of the needle is much safer. This is, however, only if recapping the needle is necessary. The nurse should also avoid recapping the needle at all if the facility policy does not require such action.
Nurses can ensure to properly dispose of used needles in the appropriate sharps container and allow themselves to do so quickly and with minimal movement. If possible, the nurse should position a sharps disposal container within arm's reach of their procedure such that once the skill is performed, they do not have to walk and potentially trip and fall with a needle in-hand. This also reduces the risk that the needle will be accidentally re-used or picked up by another healthcare worker who then has a needlestick injury.
Nurse can ensure to properly engage the safety mechanisms engineered on retractable needles before transporting them to the proper sharps disposal container.
Lastly, and most obviously, nurses should receive training on the proper techniques for use and disposal of needles, either in nursing school, programs within their facilities, or premade modules from a third party, possibly even all three. It seems tedious but it is all in the name of necessary safety! I myself have had exactly one needlestick injury and luckily it was only subcut electrolytes and the patient was a cat. It only took that one injury though for me to take these actions seriously! Related to receiving training, nurses should also promote the need for education to others. Again, tedious, but the more the better!