You're incorrect because the left hand of the assignment is the dereferenced pointer. You'd be correct if OP's code was:
int *p = 10;
*p = 10;
Compiling OP's version with gcc 9.3.0 gives the warning
warning: 'p' is uninitialized in this function
Compiling the version you're thinking of gives the warning
warning: initialization of 'int *' from 'int' makes pointer from integer without a cast
Which would be fixed by casting to (int *) as you suggested.