Using a multiscale computational approach, we probe the origin and evolution of ultraflatbands in moire superlattices of twisted bilayer MoS$_2$, a prototypical transition metal dichalcogenide. Unlike twisted bilayer graphene, we find no unique magic angles in twisted bilayer MoS$_2$ for flatband formation. Ultraflatbands form at the valence band edge for twist angles (θ) close to 0° and at both the valence and conduction band edges for θ close to 60°, and have distinct origins. For θ close to 0°, inhomogeneous hybridization in the reconstructed moire superlattice is sufficient to explain the formation of flatbands. For θ close to 60°, additionally, local strains cause the formation of modulating triangular potential wells such that electrons and holes are spatially separated. This leads to multiple energy-separated ultraflatbands at the band edges closely resembling eigenfunctions of a quantum particle in an equilateral triangle well. Twisted bilayer transition metal dichalcogenides are thus suitable candidates for the realisation of ordered quantum dot array.