If you have purchased a code scanner, there should be accompanying software and of course accompanying database software (which you have to pay for). The first step is to record the appropriate item into the database and assign it a barcode, this is the groundwork.
The functions of various types of code scanners are different, and some can directly print barcodes. This you can go to a professional store to consult.