Best way to find the largest sorted suffix in a list - USACO Sleepy Cow Sorting Python
Nice solution and implementation. Few suggestions:

Naming: the name main is generally used for the entry point of the program. In this case, a better name could be steps_to_sort_cows.
Sublist bounds: since n is fixed, instead of sublist = nums[i:n] you can write sublist = nums[i:]

Complexity
The time complexity is \$O(n*n*log(n))\$. Basically, for each cow sort all the remaining cows. Typically, it's considered not optimal for large inputs.
The space complexity is also not optimal. For each cow two lists are created, one for the new sublist and one for the sorted sublist.
Improved
To reduce space and time complexity, find the size of the sorted sublist in this way:
def steps_to_sort_cows(n, cows):
  first_sorted_cow = cows[-1]
  sorted_cows = 0
  for c in reversed(cows):
    if c &gt; first_sorted_cow:
      return n - sorted_cows
    first_sorted_cow = c
    sorted_cows += 1
  return 0

Starting from the end, count the number of sorted cows and then return n - sorted_cows.
This approach takes \$O(n)\$ time and \$O(1)\$ space complexity.