They are just alternatives to one another, they do the same thing.
The key difference is that use of the first (using __proto__) is extremely discouraged due mainly to the fact it’s deprecated. There is absolutely no guarantee that it will work, browsers are free to not implement it.
Note: it is important at this point in the curriculum to understand that you can change prototypes and how to do it.
However, IRL it’s an unusual thing to do: it’s a very slow operation (relative to anything else) and fairly manual and risky (you are deliberately breaking inheritance).
But if IRL this is a requirement, then Object.setPrototypeOf or Reflect.setPrototypeOf are what you’d use, like