Limit Post Creation Count by Author or Role

I have a site that offers non-paying members up to 5 posts using this:

function author_post_count($user_id, $post_type = array('YOUR_CUSTOM_POST_TYPE_NAME_HERE')) {
    $args = array(
        'post_type'         => $post_type,
        'author'            => $user_id,
        'posts_per_page'    => -1
    );

    $query = new WP_Query($args);
    return $query->found_posts;
}

Then I use:

if ( author_post_count(get_current_user_id()) >5) {
SHOW RESTRICTION NOTICE CODE HERE FOR USERS WITH MORE THAN 5 POSTS 
}

So you could use those two together and then the save_post hook.
If you’re not familiar, read up on it and in particular this part about avoiding a loop: https://developer.wordpress.org/reference/hooks/save_post/#avoiding-infinite-loops

Then you could change the query to use Date Parameters