How to make an imported site not accessible for existing users, but only staff and services like CDN that need to be configured?

AFAIK the simplest way is to make the site login required, turn on must approve users and aim SMTP at something like mailhog. I don’t recall if the importer approves users automatically, if it does you can do something like this in the rails console:

approved_users = AdminUserIndexQuery.new(query: 'approved', stats: false).find_users_query

approved_users.each do |u|
  u.approved = false
  u.save!
end

And then turn off approval when you’re good to go.

That way you won’t send any messages publicly during the migration, and can see all of the messages that Discourse has generated in case something goes awry.

Unless you choose to migrate passwords, users will be resetting their credentials anyhow.