Query folding means a connector translates supported M transformations into work performed by a source query engine. A CSV or Excel file has no server query engine, so its transformations run in Power Query. Filtering such a file early can still reduce later work, but that doesn't turn the filter into a folded server operation.
The editor's per-step indicator explains the current source and any boundary it can infer. Treat it as a local teaching aid. A database-backed workflow needs the real connector's native-query view, query plan or folding diagnostics to establish what the server executes. Support depends on both the source and the transformations; an arbitrary custom function cannot be assumed to fold. Moving an expensive transform after a selective filter can help, but measure the result rather than promising a fixed speed improvement.