It depends on the model maker.
For Samsung devices, you can download Good Lock from the Galaxy Store, then run QuickStar from the menu. It is reasonably easy to follow, if not then check YouTube for Good Lock. It will do what you are after.
As for other stock devices, adding am or pm to the status bar has never been on any Sony-made device I have ever had. I can't speak for other brands.