For any Mac made in the last 10–12 years, you typically do not buy a physical "piece" of software.
: Recent versions like macOS Tahoe are free downloads via the Software Update section in System Settings.
: Typically ranges from $20 to $70 on Mercari or eBay.
Physical retail "pieces" of the operating system are mostly used for restoring older PowerPC or early Intel Macs.
: Apple and Amazon sell official USB-C and MagSafe 3 chargers (starting around $39–$79 ).