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 ($theta$) close to 0$^circ$ and at both the valence and conduction band edges for $theta$ close to 60$^circ$, and have distinct origins. For$ theta$ close to 0$^circ$, inhomogeneous hybridization in the reconstructed moire superlattice is sufficient to explain the formation of flatbands. For $theta$ close to 60$^circ$, 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.