Your best option is to find the element containing the text - webdriver refers to the selenium driver object that you use to find your elements.
The code could be something like this (accuracy is not guaranteed since I'm coding on the fly):
// Find all the span elements
List<IWebElement> spans = webdriver.FindElements(By.Tag("span"));
// use ...
You can have the @before and @after hooks. where the @before hook initiates the application and the @after hook destroys the user every after a scenario is completed. And hence you should not find the user in the db each time a scenario is run.
Refer to https://www.baeldung.com/java-cucumber-hooks
public void ...
Insert random variables in test data to run multiple times
Whatever can create duplicates in your application , introduce random variables in your tests . For example each time a new user is registered its registered with new name and credentials using a random string function which returns a new unique name and credentials everytime.
Refresh db daily ...