for a Beretta 92 series, you will need to fit the rails where the barrel will slide in the frame. even on OEM barrel replacements, they are "semi-drop-in" barrels. a separate issue is the locking block and barrels fitment - these are intended to be fit together and poor fitment between the barrel and locking block can result in cycling failures or even cracking/breakage of the locking block. the locking block is the piece that is modified to fit the barrel, not the other way around. you can also get a new locking block and fit from that with jeweler files paying special mind to the "legs" of the locking block where it interacts with the frame.
typically, if the locking block fits the barrel with no slop and no "sticking" of movement, and there isn't any undue wear or damage, then the locking block can be reused and fitting the barrel's rails is the only thing needed for semi-drop-in aftermarket barrels. you will also want to ensure slide to barrel fit and that it properly locks up without binding - allowing the locking block to raise and lower as expected when the slide is moving.