There are a number of R packages that help you implement NMDS.
A good way to get started learning is to check out those packages and review the vignettes and articles that support them.
A good way to seek help with your specific problem here is to pose one here with a reproducible example. FAQ: What's a reproducible example (`reprex`) and how do I do one?.