Inserting rows into a custom table, when plugin is activated

The table isn’t defined on your insert function. So you will need to add – $table_name = $wpdb->prefix . 'countries'; as you did for the create table function.