In my experience you should always dig when creating detention ponds. This allows you to position it at the best location available to you incase water levels run high.
For this purpose, you may want to build the banks up higher than you actually intend them to go, and then leave a gap where you plan for any excess water to escape. You'll need to create a path leading away from the pond toward a creek, stream or river. You'll also need the local government's permission to do so before you introduce a new tributary to the local water table.
Depending on how big the pond is I would also recommend a very good PVC liner or if ita a bigger detention pond some kind of tank liners will do the trick.
I found a really good guide here also: https://www.hunker.com/13424245/how-to-create-a-retention-pond-for-water-runoff
good luck with your project