Basically just take a block of code and move it out to its own method.
Make sure the variables are passed in as arguments.
Sometimes, we want to make methods to help clarify the code to the reader. However, sometimes, it may be best to just eliminate the method if it's a one liner and makes more sense by itself.