Swimming is 100% technique. 20 minutes in the pool working on your technique is way better than hours doing laps back and forth with poor technique.
The best approach is:
5-10 minute warmup
10-20 minute main set with a bunch of drills (google swim drills for ideas)
5-10minute cool down