If the serial number is 12 characters long, the iMac was manufacturered after 2010, and if true, then you only need the last four characters to determine the market introduction year of the iMac. I do not believe this will work for 11 character S/N prior to 2010.
In a browser, enter the following, where the XXXX is the last four characters of your 12 character serial number:
https://support-sp.apple.com/sp/product?cc=XXXX
In Firefox 75, this should return a string like the following which was returned for my Late 2013 iMac. Safari 13.1 will download a text file [product] that you can click, and use the spacebar to Quick Look the following string format for your iMac:
<?xml version="1.0" encoding="utf-8" ?><root><name>CPU Name</name><configCode>iMac (27-inch, Late 2013)</configCode><locale>en_US</locale></root>
where the information of interest to you will be in parenthesis. Once you have the Early, Mid, or Late prefix and year, you can get more detailed information on your iMac from Everymac.
Plan B. If the serial number is less than 12 characters, or the preceding did not work for you, then get the EMC number from the bottom of the iMac stand and enter that number in the following location:
on this everymac site. It will return information on the iMac models covered by that EMC number.
Based on the information you derive from the preceding, let us know what the parenthetical market introduction string is, or the EMC number so we can look it up on the everymac site and skip your screen capture of that information.