Completely turn off automatic WordPress updates and background update checks

Sometimes, when we configure wordpress and change the theme, we don't want to update wordpress, but wordpress often pushes automatic updates, so how do you turn off automatic updates for wordpress? Methods: add the following code to the current theme