You can use the power adapter and the cable that came with your iPhone 7 or you can use the new cable that came with the iPhone 12 and buy the following if you don't have anything with a USB-C connection: Buy 20W USB-C Power Adapter - Apple
See the following from: Buy iPhone 12 and iPhone 12 mini - Apple
As part of our efforts to reach our environmental goals, iPhone 12 and iPhone 12 mini do not include a power adapter or EarPods. Included in the box is a USB‑C to Lightning cable that supports fast charging and is compatible with USB‑C power adapters and computer ports.
We encourage you to re‑use your current USB‑A to Lightning cables, power adapters, and headphones which are compatible with these iPhone models. But if you need any new Apple power adapters or headphones, they are available for purchase.