Just for clarity, two links. Note that the USB-C adapters have either-or MagSafe end choice. Best to go for the older "sideways" end with Apple's MagSafe adapter for max flexibility. The USB-C link (2) below has explanatory pictures.
For those of you caught out by Apple’s discarding of the magnetic power adapter which has saved my MacBook on many occasion there is this useful device which inserts a magnetic break point in the mains lead
https://www.amazon.co.uk/Magnetic-Charging-Transfer-Connections-Compatible/dp/B07R15RVJ5/ref=sr_1_4?dchild=1&keywords=usb+c+magnetic&qid=1598306455&sr=8-4