Preheat the oven to 450 degrees at least 30 minutes.
Season the prime rib at least 2 hours prior to cooking:
Whisk the pepper, salt, garlic, and rosemary together in a bowl. Rub the prime rib on all sides with the oil, then generously sprinkle the herb and spice rub on all sides, pressing it into the meat with your hands.
If prepping the prime rib the night before you plan to roast it, place it in a casserole dish or other large rimmed pan and loosely cover with plastic wrap. Refrigerate overnight.
Let the prime rib come to room temperature for 2 hours before you put it in the oven.
Roast the prime rib:
Preheat the oven to 450 degrees for at least 30 minutes while the prime rib comes to room temperature.
Place the prime rib bone-side down in a high-sided roasting pan, using the bones as a natural roasting rack for the meat.
Cook the roast for 15 minutes, then reduce the oven temperature to 325 degrees. Continue to cook the roast uncovered until a meat thermometer inserted into the thickest part of the roast reads 120 degrees for a finished medium-rare prime rib or 130 degrees for a finished medium prime rib. Estimate about 15 minutes of cooking time per pound of prime rib. Once the thermometer hits its target temperature, remove it from the oven and let it rest for 20 minutes.
The roast will continue to cook as the juices inside settle, raising the internal temperature to 130 degrees to be served medium-rare or to 140 degrees to be served medium.
If the rib bones are still attached to the roast, use a carving fork to stabilize the roast while guiding your knife along the curve of the bones. If you removed the bones first, then retied them to the roast, simply snip the twine holding the bones onto the roast and remove.
Slice the roast as thickly or thinly as you prefer and serve.