How to get category URL with the slug?

The WP function get_category_link() will do the trick.

/**
 * Gets the URL for a category term archive based on the category's slug.
 *
 * @param string $category_slug The slug of the category to get the category arcive for.
 *
 * @return string The category (term) archive URL. Empty string on error.
 */
function wpse_get_category_url_by_slug( $category_slug ) {
    return get_category_link( get_cat_ID( $category_slug ) );
}

Instead of a creating a wrapper like the example above, you could also just call the WP function directly: get_category_link( get_cat_ID( $category_slug ) )