Oxidation number of osmium (Os) in OsO4 is
It is +8.
See, if there isn’t any charge denoted in the molecule, then we are not gonna consider it ourself.
Also, we know that the most common oxidation state of O is -2, which is the case here also.
If x is the oxidation number of Os, then
x + 4(-2) = 0
gives, x = +8