Welcome to the forum, @spencer886!
Unlike alpha diversity metrics, which estimate diversity within a certain niche /sample, beta diversity is shaped to compare different nuches/samples. So, basically you have a matrix with distances of each sample in you feature table to all other samples.
On the graph, you can see distances of gut samples to gut samples (all distances between samples in gut group), as well as distances between samples from different groups (rest of the boxes).
Since each sample from one group compared to each sample within other (the same as well) group, number of distances is higher than number of samples.
See this post for better explanation
When comparing group A with group B, sampling size will be number of samples in your metadata that belongs to compared groups.
Attached random photo from the internet as an example