The “data section” has several purposes:
It allows the reader to understand everything that builds upon the data, i.e., the analysis and conclusions based on this.
It allows the readers (and particularly the peer reviewers) to assess the validity of your approach. For example, did you use state-of-the-art measurement techniques, did you avoid trivial biases, etc.?
It allows the reader to reproduce your entire study, should they be inclined to do this.
Points 2 and 3 can be covered with a citation in your second paper: For example, ideally the peer review of your first paper already validated your data collection and everybody who wants to reproduce your paper has to expect to follow citations anyway.
However, you do not want somebody who simply wants to understand what you did (Point 1) to have to follow your citation and flip back and forth between the papers.
Therefore, the usual approach is to cite your first paper and summarise the qualities of the dataset that are relevant for understanding the current paper.
Some details can also be mentioned ad hoc later, e.g.: ”That one odd datapoint is due to …”
Now there are some extreme cases, where the relevant information on your data spans the order of magnitude of a page or more. In that case, it might be reasonable to favour avoiding redundancy and rely on the reader reading at least parts of your first paper. At this point, it depends on to what extent the journal or your field require papers to stand on their own and you’ll have to consult somebody familiar with this (i.e., the journal or your supervisor).
Both papers will be part of my PhD thesis.
The journal and the readers won’t care or even know, so this has little impact. If your thesis is cumulative, you might consider marking the redundancy somehow (if the regulations allow for this). In my cumulative thesis, I replaced citations of my other papers that were part of the thesis with references to the respective chapters. Thus the reader of the thesis would know when redundancy was afoot.