Looping to organize and display custom posts by category using PHP and WordPress

Add this after $args

$categories = get_terms('category', $args); //get all categories
$count = count($categories ); //count categories
if ( $count > 0 ){ //Check if you got some categories
foreach ( $categories as $category ) { 
 $args['cat'] = $category->term_id; //get the id of each category and add it as a parameter
$loop_our_work = new WP_Query( $args ); //start a new query with 'cat' parameter inside of it for each category
if($loop_our_work ->have_posts()) { //always check if query have posts
    //echo here category name or whatever you need about category
while( $loop_our_work ->have_posts() ) : $loop_our_work ->the_post(); 
//echo here whatever you need for each post on current category inside the loop
endwhile;
} //endif

The code is not tested but i hope it helps you