A modifier's body runs around the function: code before `_;` runs first, code after runs on the way out. Multiple modifiers nest left to right.
modifier nonReentrant() {
require(!locked, "reentrant");
locked = true;
_;
locked = false;
}Modifiers duplicate their bytecode at every use site, so a long modifier can bloat your contract; call an internal function from a short modifier instead.