Users can have ore than one role, this will output the first role listed. <?php echo 'Your role: ', wp_get_current_user()->roles[0]; ?>
This would be inserted on a template file, not within post content. If you want it within content it needs to be wrapped into a shortcode or custom block. If you want to alter template files, it’s recommended you create a child theme.