On Mac2Sell we try find the easiest way for an user to identify his Apple Device.
In 2021 the serial number scheme of Apple Devices will change is rumored to become rand generated.
For online decoding, use the Apple serial search tool from Beetstch.
Tab-tv provides nice graphics in an article about decoding the serials.
From OpenCorePkg, the macserial command line (source code) is decoding the serials
There is also a Python API