How to exclude category and post_tag taxonomy while displaying custom taxonomy?

Each taxonomy object will have _builtin set to 1 for native taxonomies, so check $taxonomy->_builtin in your foreach loop first before fetching the terms.

tech