Mr Lewis, a popular footballer from Ammanford, was aged 27 when he died by suicide in February 2019.
The charity set up in his name provides rapid access to mental health support in communities across Wales.
It already operates two hubs, at Ammanford and Swansea Football Clubs, to encourage people to come forward.
William met Janet and Jesse Lewis, the parents of Mr Lewis, for a private conversation by the pitch at the stadium.
They were joined by Rhys Fisher and Shaun Williams, former teammates of Mr Lewis at Ammanford FC.
The prince then spoke to Wales rugby captain Jac Morgan and head coach Steve Tandy.
William asked Mr Morgan and Mr Tandy about their experiences with mental health support as their careers progressed.
“I’ve heard from some football guys that when they reach a certain level, mental health becomes harder to talk about,” he said.
“Do you feel, as your career has progressed, that it gets harder to talk about it and be open about it?”
Mr Tandy said he aimed to create an environment for players to talk about mental health, regardless of level.
As he left the table, William said to Mr Tandy “good luck, we need you” before telling Mr Morgan: “We really need you too.”
More than 7,000 people die by suicide each year in the UK, equating to an average of 19 lives lost per day.
Men consistently account for 75 per cent of suicides, with rates the highest in the North of England and Wales, as well as deprived areas across the UK.
William was told that men are usually more reluctant to come forward and seek support, though the Jac Lewis Foundation hubs are now seeing an even amount of men and women.
He then joined a group of people who were painting stones, choosing a red paint for his pebble as he was in Wales.
He was approached by Bethan Mair, who handed William a pebble she had painted with a picture of a flower.
Ms Mair told William how her partner, Rhys, died by suicide in May last year and she received counselling through the Jac Lewis Foundation.
Describing William, she said: “As a person who has also been through lots in his life, he was full of compassion and genuine empathy, I think.”
William placed his hand on Ms Mair’s shoulder as she told him her experiences and thanked her for the pebble, adding: “I will hold on to this”.
Callum Humphreys, mental health manager for the Jac Lewis Foundation, described the royal visit as ‘amazing’ for the charity.