Find all functions $f : \mathbb{N} \to \mathbb{N}$ with
$$f(x) + yf(f(x)) < x(1 + f(y)) + 2021$$
holds for all positive integers $x,y.$
1. **Claim**: The only solution is \( f(x) = x \), which clearly works.

2. **Define the set \( A \)**:
   \[
   A = \{ a \ge 0 \colon \exists \, b \in \mathbb{R} \colon  \forall \, x \in \mathbb{N} \colon f(x) \ge ax + b \}
   \]
   This set \( A \) contains all possible slopes \( a \) such that \( f(x) \) is bounded below by a linear function with slope \( a \).

3. **Initial bounds**:
   - Consider \( P(1, x) \):
     \[
     f(1) + xf(f(1)) < 1(1 + f(x)) + 2021
     \]
     Rearranging, we get:
     \[
     f(x) > f(1) + xf(f(1)) - 2022
     \]
     Since \( f(f(1)) \ge 1 \), we have:
     \[
     f(x) > x - 2022
     \]
     This implies \( 1 \in A \).

   - Consider \( P(x, 1) \):
     \[
     f(x) + 1f(f(x)) < x(1 + f(1)) + 2021
     \]
     Rearranging, we get:
     \[
     f(x) < (1 + f(1))x + 2021
     \]
     This shows that \( a \le 1 + f(1) \) for every \( a \in A \).

4. **Assume \( a \in A \)**:
   - Let \( b \in \mathbb{R} \) satisfy \( f(x) \ge ax + b \) for all \( x \in \mathbb{N} \).
   - For all \( x, y \in \mathbb{N} \):
     \[
     xf(y) > ax + b - 2021 - x + (a(ax + b) + b)y
     \]
     Simplifying, we get:
     \[
     f(y) > a^2 y + a - 1 + \frac{b - 2021 + (ab + b)y}{x}
     \]
     Taking \( x \to \infty \), we obtain:
     \[
     f(y) \ge a^2 y + a - 1
     \]
     Hence, \( a^2 \in A \).

5. **Boundedness of \( A \)**:
   - If \( A \) contains any element \( > 1 \), by applying the argument repeatedly, we obtain that \( A \) is unbounded, which is a contradiction.
   - Hence, \( 1 \) is the maximal element of \( A \).

6. **Combining results**:
   - Since \( f(y) > \frac{f(f(x))}{x} y + \frac{f(x) - 2021}{x} - 1 \) for all \( x, y \), we must have \( \frac{f(f(x))}{x} \in A \).
   - Consequently, \( f(f(x)) \le x \) for all \( x \).

7. **Final bounds**:
   - Combining \( f(x) \ge x - 2022 \) and \( f(f(x)) \le x \), we get:
     \[
     f(x) \le f(f(x)) + 2022 \le x + 2022
     \]
   - Hence, \( \lim_{x \to \infty} \frac{f(x)}{x} = \lim_{x \to \infty} \frac{f(f(x))}{x} = 1 \).

8. **Final implication**:
   - \( P(x, y) \) implies:
     \[
     f(y) > \frac{f(f(x))}{x} y + \frac{f(x)}{x} - 1 - \frac{2021}{x}
     \]
   - With \( x \to \infty \), we get \( f(y) \ge y \) for all \( y \).
   - Together with \( f(f(x)) \le x \), this yields \( f(x) = x \).

\(\blacksquare\)

The final answer is \( \boxed{ f(x) = x } \).