Goal: How can we change and install the lock?

Which of the following methods is more reasonable for accomplishing this goal?
Purchase your new lock, remove the old lock and deadbolt, insert the new deadbolt first, then insert the new dead bolt lock then test the new lock.