If a ridelog is set to "private", it is not included in heatmap.
If a ridelog is set to "Hide GPS & Trails Ridden", it is not included in heatmap.
If a ridelog detects you rode a "hidden" trail your ride will be auto-flagged as "sensitive" and it is not included in heatmap.
If a ridelog goes within a personal privacy zone, it is not included in heatmap.
If you don't use the Trailforks app to record a ride and instead have Garmin or Strava linked, both have a default setting for imported rides which can be toggled to private if you wish.
Generating global heatmaps is very resource intensive, they are heavily cached once generated. So if you edit old ridelogs to be private, they won't immediately be removed from the heatmap. It will take time before that region of the heatmap is re-generated, sometimes months. With additional Trailforks resources, work is being done to reduce the update time. It's the same delay with rides being added though, so if you forget to make a ride private, it won't be added until the heatmap is updated, so you have plenty of time to change that setting after saving.
There are more features than just the heatmap a ridelog will be excluded from if any of the above are true, like helping determine the most popular routes in an area, or viewing rides matching a trail.