Tips for keeping milk flowing?

Any tips on keeping milk supply flowing for a while? I’m currently pregnant with my second & due next month. I plan on breast feeding, or at least pumping like my first child. However, the first time around, my milk dried up after about 3 weeks after giving birth. I went from being able to fill multiple bottles in one sitting to barely even pumping 2oz (my son wouldn’t latch on to my breast, so pumping was my next option.) Last time, the only thing I was really recommended to do was pump as often as possible, but apparently, that didn’t work with increasing my milk supply, as it dried up pretty quick. Is there anything else I can do to keep my supply up? I wanna be able to do it for longer than 3 weeks this time around.