If you are entering a product's barcode in a Search field and are not getting results, then a setting to allow a product search based on barcodes needs to be enabled.
In your admin dashboard, navigate to catalog > Product Settings > Elasticsearch. Under the Search Configuration tab, locate a button
product - commodityNumber
and toggle it ON. Also, set a boosting number of either 10, 15 or 20 to ensure a search by barcodes gets a boost.
Next, under Scope & Reindex tab, click the "Reindex" button to reindex the site.
Once the site is reindexed, a search using barcodes will return a successful result.