1. Looks like the failure happened on a knot. The failure also happened with whomever selected that piece of wood & didn't cut it down to use somewhere else.
2. As noted, sister 2 additional pieced of similar sized wood on the sides & nail away.
2a. Prior to fixing the break, dig around @ the bottom of the insulation where this cripple stud connects to the rafter & ensure it didn't somehow come loose @ that joint. If so, gang nail secure it again.
3. Where do you live? If local(ish), I can loan you my Milwaukee cordless 21⁰ framing gun.
4. For walking around up there (do this project before 10! So you don't melt), Home Depot smhas a ⅝" Tongue & Groove piece of OSB that is 2'×4', sized right for most attic access hatches or pull down ladder.
Get at least 1 or 2 of those & screw them down so you don't step through the ceiling. Screw in so you can move the new deck OSB if needed (& cut shallow slots in the rafters if you need to slip some cables in there - no more than ½ inch deep. Spread out some of these runners if you have multiple lines to account for).