Running NM Cable In Attic Along Rafters
You can run along the side for parallel as you have done,
Going down the “face” of the rafter is ok.  Make sure to stay away from the roof side, you don’t want any future roofing nails punching through the cable.