Replacing only a portion of a roof is not advised because the underlayment and flashings all tie together as one, to build the full roof system.
In some circumstances such as additions to a building or home, only part of the roof needs to be replaced or installed.  This can be done but it requires very special attention to detail to tie in the old section with the new roofing materials.