There are external devices that can be attached to the camera to record gyro data, e.g https://docs.gyroflow.xyz/app/advanced-usage/using-external-... I just ordered one a few weeks ago and haven't received it yet, so can't talk about personal experience, but there's no technical reason it couldn't work well.
Some months ago I tested footage of my A7C2 on Gyroflow expecting to do visual stabilization, and found my camera has a gyro (didn't know about it) and automatically adds that info to the videos.
The result was pretty good and it was super easy to do it.
In the guide videos they show you just have to sync it up by pressing the record button and end record button on both the gyroscope and the camera at the same time and this is apparently enough to calculate the time difference between the two clocks.
I think mikae1 refers to the lens/sensor stabilization, as it can be problematic if you combine it with other stabilization systems. My camera already embeds gyro information automatically in the video files without intervention (I didn't even know about it).