Edit first and then stabilise - for 2 main reasons: 1/ You don't want the stabiliser having to deal with the camera 'swishing' about at the top/tail of a shot particularly with handheld photography; and 2/ if you stabilise the shot and then edit it later, the stabiliser will very probably want you to stabilise it again after the re-edit.
Be aware that in VMS stabilizing is only possible at media level and not at event level. To stabilise only a trimmed part of an event you should create first a subclip of that part and stabilise that subclip at media level.
Many thanks for the helpful replies. I definitely have some camera "swishing" in my shots. 😀 I found out about using media level when I tried to do it on the event and got the error msg. 😀
To clarify a previous suggestion -- if you want to stabilize only the trimmed clips, you should render them and reintroduce them to the timeline. There are a couple of ways to do this. I believe this is still the case; Stabilizer is intended to be used only at the Media level.
You can trim directly an event on the timeline, than right click trimmed event and choose create subclip. A subclip will be generated and will overlay the event on the timeline as a "take". Also the subclip will show up in the Project Media tab. Stabilize the subclip in the Project Media tab. The result of the stabilise is shown directly in the overlay take at the event. By pressing "T" you can switch between unstabilised and stabilised to see difference. Don't delete subclip, you will loose stabilisation.
Render whole stabilized project when finished, no renders in between as wrongly suggested here before.
Another useful trick to compare unstabilised and stabilised in the preview is the split screen view. When activated it will show one half of the preview unstabilised and the other half stabilised at the same time. (this setting will not effect the renderproces).