Casting Time: 1 action
Range: 90 feet
Components: V, S, M (a piece of tentacle from a giant octopus or a giant squid)
Duration: Concentration, up to 1 minute
The Squirming, ebony tentacles will fill a 20-foot square on the ground which you can see within a range. For the specific duration, these tentacles will turn the ground in an area into the difficult terrain.
But whenever the creature will be entered the affected area for the first time on a turn or else it will start its turn over there and the creature must be succeeded on a Dexterity saving throw or else it will take 3d6 bludgeoning damage and be restrained by the tentacles until the spell will end. One of the creatures which starts its turn in an area and already is restrained by the tentacles will take 3d6 bludgeoning damage.
Basically, a creature will be restrained by the tentacles able to use its action for making a strength or else the dexterity check (its choice) against your spell save DC. On a success, it will be free by itself only.