New York Strip Steak

1 1/2-inch strip steak (about 3/4 pound)
Kosher salt and pepper
2 tsp. olive oil
4 cloves garlic, in skins
1 sprig fresh rosemary

Heat oven to 425°F. Heat medium cast-iron skillet on medium-high. Season steak with 1/2 teaspoon each salt and pepper. Add oil to skillet, then add steak, garlic, and rosemary and cook until steak is browned, about 3 minutes per side.
Transfer skillet to oven and roast until steak is at desired doneness, 3 to 6 minutes for medium. Transfer steak to cutting board and let rest at least 5 minutes before slicing.