You have to do two things. Firstly, you must allow access to KWGT and Samsung Health in Health Connect.
Secondly, the connection to health Connect must be activated in the Samsung Health settings.
If this still does not work for you, you can try the following workaround.
Activate the permanent notification of steps in the Samsung Health settings.
You can then use the following formula in KWGT to extract the number of steps from the permanent notification:
$tc(split,ni(s+if(ni(s0, pkg)=com.sec.android.app.shealth, 0, ni(s1, pkg)=com.sec.android.app.shealth, 1, ni(s2, pkg)=com.sec.android.app.shealth, 2, ni(s3, pkg)=com.sec.android.app.shealth, 3, ni(s4, pkg)=com.sec.android.app.shealth, 4, ni(s5, pkg)=com.sec.android.app.shealth, 5, ni(s6, pkg)=com.sec.android.app.shealth, 6, ni(s7, pkg)=com.sec.android.app.shealth, 7), title), " ",0)$
The only disadvantage of this workaround is that the Samsung Health notification is permanently displayed in the notifications. If you swipe it away, the formula will no longer work. If this happens to you by mistake, just open Samsung Health. The notification will then appear again.