nextElementSibling
<div class="one">
<p class="text"></p>
</div>
<div class="two">
<p class="text"></p>
</div>
<script type="text/javascript">
let contain = document.querySelector('.one > .text');
contain.innerHTML = 'Текст 1';
let next = contain.nextElementSibling;
next.innerHTML = 'Текст 2';
</script>
<div class="one">
<p class="text"></p>
</div>
<div class="two">
<p class="text"></p>
</div>
<script type="text/javascript">
let contain = document.querySelector('.one > .text');
contain.innerHTML = 'Текст 1';
let next = contain.parentElement.nextElementSibling.firstElementChild;
next.innerHTML = 'Текст 2';
</script>