I want to display the content of a text field only if it has been entered

Do echo inside an if statement.

function show_my_message() {
  $settings = get_option('wc_checkout_message_settings');

  //Check if the array is set
  if( isset($settings['wc_checkout_message_text_field_0']) && !empty($settings['wc_checkout_message_text_field_0']) ){
    echo $settings['wc_checkout_message_text_field_0'];   
  } 

  //Check the other value and show it
  if(isset($settings['wc_checkout_message_text_field_1']) && !empty($settings['wc_checkout_message_text_field_1']) ){
    echo $settings['wc_checkout_message_text_field_1']; 
  }

}