This is happening because the fashion mnist dataset does not have enough images to fill 64 batch sizes for the entire dataset. Due to this the last batch has a size of 32. This does not affect your training. The else statement is just printing out the last batch. Why do you use the else: statement? Instead of doing that you should do something like this
for e in range(epochs):
    running_loss = 0
    for images, labels in trainloader:
        log_ps = model(images)
        loss = criterion(log_ps, labels)
        
        optimizer.zero_grad()
        loss.backward()
        optimizer.step()
        
        running_loss += loss.item()
    
    print(f"Training loss: {running_loss/len(trainloader)}")
    print(images.shape)

Where there is no else statement and the print functions are in the epoch loop not the dataloader loop. It will still print out 32 as the batch size but like I said above this is not a problem.