The SIMs should be the same size and interchangeable ... but you may need a new SIM to get 5G service ... just move the SIM from your iPhone 7 to the new iPhone 12.
I got an error with Verizon. Got a message saying transfer was incompatible. Had to chat into Verizon. I’d imagine ATT wouldn’t be more complicated - didn’t take long.