Explaining what the others said by way of example:
Job requires £100 of materials and 2 different tradesmen do the job each charging £200 for their labour, one VAT-registered, the other not.
Vat-registered tradesman pays £100 for the materials plus £20 VAT. On the customer invoice he shows, materials £100, labour £200, VAT (on the total of £300) is £60. Total price £360.
Non-VAT tradesman does the same but on the customer invoice he shows, materials £120, labour £200. Total £320.
The first tradesman later completes his VAT return showing £60 due to be paid to HMRC but offsets this amount by the £20 he has already paid the builders' merchant on materials. He pays HMRC £40.
Worth being aware that a few unscrupulous VAT-registered tradesmen have been known to show evidence to customers of their material cost purchases by way of material receipts but fail to deduct the VAT element before charging the customer for the job, onto which VAT is then added. Tradesman makes more money that way.