These are cable staples. Some of these use a nail, and some use a literal staple. Hammering in the staple ones is usually possible, but it would be much easier to buy some of the nail ones. This link is not a recommendation for a specific product. Just an example:
https://www.amazon.com/Gardner-Bender-PSW-165-Low-Voltage-Electrical/dp/B002YDWYL4/