How to echo Tags and Categories as plain text

Yes, there’s many ways to do it,

You must add parameters to the function to override default value, first parameter must be empty

the_tags( '' );

echo '<meta itemprop="keywords" content="'. the_tags( '') .''"/>';

There is also wp_get_post_terms() function if you want more control,

Create a function in functions.php

function wpse_get_tags(){
   global $post;
   $term_list = wp_get_post_terms($post->ID, 'post_tag', array("fields" => "all"));
       foreach($term_list as $term_single) {
           $tags .= $term_single->name .', '; // do the job to remove last comma
       }
     return $tags;
 }

In your code

echo '<meta itemprop="keywords" content="''.wpse_get_tags().''"/>';