Your profile indicates that you are in Florida. I am in California. Your requirements may be different from mine.
2020 NEC:
334.23 In Accessible Attics. The installation of cable in accessible attics or roof spaces shall also comply with 320.23.
320.23 In Accessible Attics.
Type AC cables in accessible attics or roof spaces shall be installed as specified in 320.23(A) and ( B). (A) Cables Run Across the Top of Floor Joists. Where run across the top of floor joists, or within 2.1 m (7 ft) of the floor or floor joists across the face of rafters or studding, the cable shall be protected by guard strips that are at least as high as the cable. Where this space is not accessible by permanently installed stairs or ladders, protection shall only be required within 1.8 m (6 ft) of the nearest edge of the scuttle hole or attic entrance.
334.30 Securing and Supporting.
Nonmetallic-sheathed cable shall be supported and secured by staples, cable ties listed and identified for securement and support, or straps, hangers, or similar fittings designed and installed so as not to damage the cable, at intervals not exceeding 1.4 m (4)4 ft) and within 300 mm (12 in.) of every cable entry into enclosures such as outlet boxes, junction boxes, cabinets, or fittings. The cable length between the cable entry and the closest cable support shall not exceed 450 mm (18 in.). Flat cables shall not be stapled on edge.
314.23 Supports.
Enclosures within the scope of this article shall be supported in accordance with one or more of the provisions in 314.23(A) through (H).
(A) Surface Mounting. An enclosure mounted on a building or other surface shall be rigidly and securely fastened in place. If the surface does not provide rigid and secure support, additional support in accordance with other provisions of this section shall be provided.
(B) Structural Mounting. An enclosure supported from a structural member or from grade shall be rigidly supported either directly or by using a metal, polymeric, or wood brace.