How to set default values for options page

This can be done by storing a version for your plugin and check if that version exists, it means the plugin is installed and if it does not exist then you can setup default options “once only”.

Check if plugin is installed, if it is not then setup default options and store a plugin version to avoid resetting your options on every page load

// check for new installation and setup default options
add_action( 'init', 'check_plugin_version' );
function check_plugin_version() {

    // this will run your default option setup if the version does not exist
    if ( ! defined( 'IFRAME_REQUEST' ) && get_option( 'my_plugin_version' ) == null ) {
        setup_options();
        update_option( 'my_plugin_version', '1.0.0' );
    }
}

Setup default options

// setup default options
function setup_options() {

    // here you can save your default options
    // the first time your plugin will run

    update_option( 'myoption_id1', '...' );
    update_option( 'myoption_id2', '...' );
    //etc

}