How to distinguish assets?

To complement @scholtz’s response, if you want to detect some specific types of asset, you will need to understand how these assets are defined by the various stakeholders and design your own filter.

But in many cases, on Algorand as on other blockchains, there is no way to distinguish what an asset is for: a stable coin will look like a loyalty point or a wrapped Bitcoin on the chain. You would need out-of-chain information to distinguish those.