Upgrading from a freewheel type to cassette type I'm kinda new for this, I am planning upgrade my bike from a freewheel type to a cassette type. How can I determine the cogs for the cassette type? My old bike has 8-speed freewheel cogs gears which range from 13T-28T.
You need same number of speeds, same cog spacing and freehub body splines splines. If you don't have any specific need to change the range, you can pick the same sizes. If you want to change the range, there are plenty of answers about that on this site.

For cog spacing and splines, there are two common ones for 8-speed: one for Campagnolo and other for Shimano and everything else. Unless you have a road bike with Campagnolo, you can just pick any 8-speed cassette that is not advertised as Campagnolo compatible.