I found a little problem if you using livewire and content get update x-init will not run and textarea will be not resized. My solution is place in code this script:
and in textarea place this: @textarea-resize.window="resize()"
Im not sure if its best solution but maybe help.
Handy tutorial, I've come across clients requesting this a few times, but none since I've been using Alpine JS all the time.
I quickly created an Alpine JS plugin after watching this, hopefully it can help others in the future - https://github.com/markmead/alpinejs-textarea-autogrow