How to turn off automatic updates of the WordPress core

In wp-config.php add

// Disable all wordpress auto updates. 
define('AUTOMATIC_UPDATER_DISABLED', true);
define('WP_AUTO_UPDATE_CORE', false);

In functions.php add

// Disable auto plugin updates
add_filter('auto_update_plugin', '__return_false');

// Disable auto theme updates
add_filter('auto_update_theme', '__return_false');