What's the first step to learn Verilog coding to sort values?
The basic hardware sorting element is a module that has two inputs and two outputs. It contains a comparator and two multiplexers, and presents the smaller of the two inputs at one of its output ports, and the larger at the other output port.

There are many ways to use such a module to sort a list of items, with a wide range of space-vs.-time tradeoffs. At one extreme, you can build a completely combinatorial sorting network (with optional pipeline registers to increase throughput), but the resources required grows O(N2). I have implemented such a network to create a real-time median filter for high-definition video.