I think you did exactly the right thing.
You were not sailing so all the talk of sails
and reefing etc do not apply. Putting up sail in those conditions is impossible.
Motoring slowly into the wind
is the launch equivalent of heaving to. It gives you time to assess the conditions and decide what happens next. I usually prefer to sail at a 30 degree angle to the wind/waves so as to prevent waves changes your course.
There are times when weather
changes without warning. The signs can be hidden by land nearby.