The idea is not that hard, but the calculation is a bit messy and tricky.
Let's first prove that if $p \geq \frac{\sqrt{5}-1}{2}$, the inequality holds.
(Note that $\frac{2p-1}{p} \geq 1-p$ and $p^2 \geq 1-p$, which will be used frequently throughout the proof.)
Lemma For a given $y_1, y_2, ..., y_{2024}$, for $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i})$ to be minimum, it is sufficient to see the case when $x_i$ is rather 0, 1 or a certain value $a$. (In other words, $0=...=x_i<x_{i+1}=...=x_j=a<x_{j+1}=...=1$ for certain $0 \leq i < j \leq 2024$ and $0 \leq a\leq 1$.)
Let's define as $x_0=0$ and $x_{2025}=1$.
Now, let's assume that $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i})$ is minimum with $x_i \neq x_{i+1}$ for three or more i and we cannot decrease the number of indexes that $x_i \neq x_{i+1}$. Let's name them $i_1, i_2, i_3$ ($0 \leq i_1 < i_2 < i_3 \leq 2024$)
Then, $x_{i_1}<x_{i_1+1}=...=x_{i_2}<x_{i_2+1}=...=x_{i_3}<x_{i_3+1}$
The part of the left side of the inequality is written as below:
$$\displaystyle \sum_{i=i_1+1}^{i_3}x_i(y_{2025-i}-y_{2024-i}) = (y_{2024-i_1}-y_{2024-i_2})x_{i_2} + (y_{2024-i_2}-y_{2024-i_3})x_{i_3}$$First case) $(y_{2024-i_1}-y_{2024-i_2})(i_3-i_2) > (y_{2024-i_2}-y_{2024-i_3}) (i_2-i_1)$
Let's define positive real number $\delta$ which satisfies $(i_3-i_2) \delta< x_{i_1+1}-x_{i_1}$ and $(i_2-i_1) \delta< x_{i_3+1}-x_{i_3}$.
Then, let's define new sequence $z_1, ..., z_{2024}$ as follows:
\[
z_i = \begin{cases*}
x_i - (i_3 - i_2)\delta & $i_1<i \leq i_2$ \\
x_i + (i_2 - i_1)\delta & $i_2 < i \leq i_3$ \\
x_i & otherwise
\end{cases*}
\]It is easy to check that $z_1 , ..., z_{2024}$ satisfies all of the conditions, and $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) \geq \sum_{i=1}^{2024}z_i(y_{2025-i}-y_{2024-i})$
So, it contradicts the assumption that the left side is minimal.
Second case) $(y_{2024-i_1}-y_{2024-i_2})(i_3-i_2) \leq (y_{2024-i_2}-y_{2024-i_3}) (i_2-i_1)$
Let's define positive real number $\delta$ which satisfies $(i_3-i_1) \delta< x_{i_2+1}-x_{i_2}$.
Then, let's define new sequence $z_1, ..., z_{2024}$ as follows:
\[
z_i = \begin{cases*}
x_i + (i_3 - i_2)\delta & $i_1<i \leq i_2$ \\
x_i - (i_2 - i_1)\delta & $i_2 < i \leq i_3$ \\
x_i & otherwise
\end{cases*}
\]It is easy to check that $z_1 , ..., z_{2024}$ satisfies all of the conditions, and $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) \geq \sum_{i=1}^{2024}z_i(y_{2025-i}-y_{2024-i})$
So, it contradicts the assumption that the left side is minimum with least indexes of $x_i \neq x_{i+1}$.
In conclusion, $x_i \neq x_{i+1}$ is only true for two or less i, so the lemma is proved.
Since $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) = \sum_{i=1}^{2024}y_i(x_{2025-i}-x_{2024-i})$, we can say that $y_i$ can only have one of the three values, 0, 1, or certain value $b$.
Now, we can write $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) = a(y_{2024-i}-y_{2024-j})+y_{2024-j}$.
Let's note that by summation condition, $(j-i)a+2024-j = 2024p$. $0 \leq a \leq 1$ yields that $0 \leq i \leq 2024(1-p)\leq j \leq 2024$.
Also, the summation condition of y gives $2024p \leq (2024-j)y_{2024-j} +(j-i) y_{2024-i} + i$.
From now on, several case works are required.
Case 1 $y_{2024-j}=0$
Since $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) = ay_{2024-i}$ and $y_{2024-i} \geq \frac{2024p-i}{j-i}$, we should show that
$$\frac{2024p-2024+j}{j-i} \cdot \frac{2024p-i}{j-i} \geq 1-p$$Let's substitute $j-i = k$ for convenience. Using the $y_{2024-i} \leq 1$, it is clear that $j \geq 2024p$ and we have $2024p-i \leq k \leq 2024-i$.
The inequality changes as below:
$$\frac{(2024p-2024+i+k)(2024p-i)}{k^2} \geq 1-p$$Since this is a quadratic equation of $\displaystyle \frac{1}{k}$ and the highest order coefficient is $2024p(2024p-2024)<0$, the minimum occurs when $k$ is on the boundary value.
Putting $k=2024p-i$: $\frac{2024(2p-1)}{2024p-i} \geq \frac{2p-1}{p} \geq 1-p$
Putting $k=2024-i$: we should minimize $\frac{2024p(2024p-i)}{(2024-i)^2}$.
Substituting $2024-i = i'$, $\frac{2024p(2024p-i)}{(2024-i)^2} = \frac{2024p(2024p-2024+i')}{i'^2}$.
Since this is a quadratic equation of $\displaystyle \frac{1}{i'}$ and the highest order coefficient is $2024p(2024p-2024)<0$, the value is minimized
when $i'$ is on boundary value, or $i$ is on boundary value. (Note that $0 \leq i \leq 2024(1-p)$)
Putting $i=0$: $p^2 \geq 1-p$
Putting $i=2024(1-p)$: $\frac{2p-1}{p} \geq 1-p$
Case 2 $y_{2024-i}=1$
In this case, the calculation is almost the same as the first case, but I'll show it for perfection.
Let's first regard the case $j \geq 2024p$. In this case, $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) = a+(1-a)y_{2024-j} \geq a$.
The below inequality ends this case.
$$a=\frac{2024p-2024+j}{j-i} \geq \frac{2024p-2024+j}{j} = 1-\frac{2024-2024p}{j} \geq 1-\frac{1-p}{p} = \frac{2p-1}{p} \geq 1-p$$Now, let's consider $j < 2024p$.
Since $\displaystyle \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) = a+(1-a)y_{2024-j}$ and $y_{2024-j} \geq \frac{2024p-j}{2024-j}$, we should show that
$$\frac{2024-2024p-i}{j-i}\cdot \frac{2024p-j}{2024-j} + \frac{2024p-2024+j}{j-i} \geq 1-p$$This is equivalent with $$\frac{2024-2024p-i}{j-i}\cdot \frac{2024-2024p}{2024-j} \leq p$$Since $\frac{2024-2024p-i}{j-i} = 1+\frac{2024-2024p-j}{j-i}$ and $2024-2024p \leq j$, The right side maximum when i is minimum.
So, putting $i=0$: $\frac{(2024-2024p)^2}{j(2024-j)} \leq p$.
$j(2024-j)$ is minimum when j is on the boundary value: $j=2024(1-p)$ and $j=2024p$.
Putting $j=2024(1-p)$: $\frac{1-p}{p} \leq p$
Putting $j=2024p$: $\frac{1-p}{p} \leq p$
Case 3 $y_{2024-j} \neq 0$ and $y_{2024-i} \neq 1$.
Since $0 \leq y_{2024-j} \leq y_{2024-i} \leq 1$ and the value possible is 0, 1, and $b$, it is clear that $y_{2024-j}=y_{2024-i} = b$.
$$ \sum_{i=1}^{2024}x_i(y_{2025-i}-y_{2024-i}) = b \geq \frac{2024p-i}{2024-i} = 1 - \frac{2024-2024p}{2024-i} \geq \frac{2p-1}{p} \geq 1-p$$
For all case, the inequality holds for $p \geq \frac{\sqrt{5}-1}{2}$.
Also, testing $x_1 = ... = x_{2024} = y_{1} = ... = y_{2024}$, $p^2 \geq 1-p$ has to hold, so $\frac{\sqrt{5}-1}{2}$ is an optimal number.