There are two scenarios in this condition. If you’ve blocked a number using the phone app or any third-party app like RoboKiller, Hiya, or Truecaller, you’ll have to reblock them.
On the other hand, if you’ve blocked the numbers on the network level, i.e., using your carrier, you don’t have to redo it even when switching devices.