My brand new MacBook Pro 16" had "Macintosh HD" at disk1s1 and "Macintosh HD - Data" at disk1s2. I didn't realize the USB-C cable that came with it wasn't Thunderbolt 3 so I killed the Migration Assistant and ordered the cable online. When the cable came I reformatted the disk to start over and for the life of me I can't get the Device ID to match what they were out of the box. I've tried starting with a brand new Partition and installing from Disk Recovery, then running Migration Assistant (using the TB3 cable that came today) but now I'm getting Macintosh HD on disk1s5 (was on s1) and Macintosh HD - Data on disk1s1 (was on s2). I realize this doesn't impact the performance in any way but it's bugging me that I can't get it back to the way it came out of the box.
Device IDs are what the system uses to identify the drive. They often change depending on when and even where they are detected (Internal vs. USB vs Thunderbolt).
For instance, an old hard drive bootable drive might be identified as disk1s2. Take it out and put it in a USB enclosure, attach it to another Mac and it suddenly becomes disk3.
This is not something you need to try and manage and trying to make of “match what came out of the box” does nothing except create a massive amount work on your part.
Now the fact that the data partition went from slice 2 (disk1s2) to slice 5 (disk1s5) tells me that you may not have removed/reformatted the drive properly. However, this is now moving into a new question so issue the command
diskutil apfs list and post it to a new question as to the structure of your partition layout.