The order of dimensions usually depends on the library you are using
Tensorflow : (Height,Width,Channel) : HWC
PyTorch: (Channel,Height,Width) : CHW
In your case the image seems to go with CHW , since you cant apply 5x5 filters on a 1x128 image
As for the final shape , we follow the rule :
for input length N, and k-size filter , output-length = N-k+1
so each of the 10 filters produces output length = 28-5+1 = 24
so output length = (10,24,24) in the CHW format
Here is a simple Tensorflow code to test it if you want :
from tensorflow.keras.layers import Input,Conv2D
x = Input(shape=(28,28,1))
x = Conv2D(filters = 10, kernel_size = 5, padding='valid')(x)
print(x.shape)