Following years of hard work to convert all Drupal 7 style variables to the Drupal 8 configuration system and state systems, the variable_get()/variable_set() and variable_del() API is now fully removed. The variable subsystem was in place for so long to support settings not yet converted to the new configuration system but that process is now complete. The old variable_* API was removed in favor of two new systems. You should review the Overview of Configuration (vs. other types of information) to determine what system is the best successor for your Drupal 7 variable.

State system

If the data you used to tuck into variable_* is derived from other data and/or temporary in nature, you should use the State API to store it.