Linear relationships between variables from different, but related data sets.

I had a quick question. And I am sorry if it seems elementary, but I just have so much trouble with statistical analysis (I use R when I do it generally though).

I am trying to test the correlation between the % coral cover at each of my study sites, and the % of coral in sediment collected from those sites. The problem is that the coral cover per site is obtained independently of how the % coral in sediment is obtained. Specifically, I have a value for coral cover based on 3 independent samplings (linear transects) for each site. So I have the average coral cover per site. Then I collected samples of sand (3 at each site). For each of those samples, I get a % of coral in sediment value. So I wanted to see if per site, the amount of coral found in the sediment was related to the overall coral cover of the reef. Originally I had the % of sediment per sample as my X variables and the average coral cover per site as my Y variable. So

View attachment 4694

Notice though that I have the same Y value for each of the different x values per site. I wasn't sure if it was ok to do this. Someone told me that I needed to average the x values per site as well. When I did that, it leaves me with a sample size of only 6 (since I only have 6 reef sites to compare) and I am not able to identify any relationship. Does this make sense? What is the best way with this data to understand if there is any relationship. Thank you so much.