Welcome to the forum!
It’s impossible to say what’s going wrong with the little detail you’ve posted. You might review this post: How to ask a good question in particular the part about sharing code and a clone link so that people can see your app and code. That’s almost always needed for anyone to be able to help.