Is Nonnegative matrix factorization a clustering method or a dimensionality reduction method? In the matrix factorization we have the problem of decomposing a nonnegative matrix $X$ into two lower-rank matrices $W$ and $H$. I would like to know whether this method is considered as a dimension reduction algorithm or a clustering algorithm?

The purpose of clustering is to arrange items into groups. Non-negative factorization (NNMF) does not return group labels for the entries in the original matrix. However, just like with principal component analysis (PCA), the clustering step can be performed afterwards using k-means or some other clustering technique. Hence NNMF might be a useful step, but itself is not a method for finding clusters in the data.
We can try to turn it into a clustering technique by specifying clusters with some simple rule. For example, we might cluster each sample according the best fitting non-negative profile based on the loading weights. But by doing so we just introduced an additional step for clustering the data. We might have used another version of this process instead, like maybe grouping the samples according to which profiles had loadings above certain thresholds. So, even when the rules are simple, an additional step is required to arrange samples into groups.
On the other hand, reducing the number of dimensions with NNMF is trivial:  just select a subset of non-negative "profiles" and keep the same number of loadings for each original sample. Based on that I would consider NNMF to be more aligned with dimensionality reduction applications, rather than with clustering.
