Calculate \$ \lfloor n \log_2(n) \rfloor \$, exactly
Python 3, 25 bytes

lambda n:len(bin(n**n))-3

Try it online!
If the answer is \$x\$, then \$x+1 &gt; n\log{n} \ge x\$ holds true, which means \$2^{x+1} &gt; n^n \ge 2^x\$. So we can simply count the number of bits in the binary representation of \$n^n\$.