Yes, the DNS-level analytics will measure a totally different number from the client-side Javascript stuff. I saw some similar results myself (using Cloudflare vs Squarespace analytics) and wrote about it in https://bobbiechen.com/blog/2021/12/21/counting-website-visi... and https://bobbiechen.com/blog/2021/12/23/follow-up-to-counting... . As a more recent data point, https://bobbiechen.com/blog/2022/7/20/being-on-call-sucks was on the front page of HN earlier this week - Squarespace Analytics shows around 17k page views last week, while Cloudflare shows over 250k.
You can pick one metric or the other to track. I'll point out that since Javascript analytics are typically blocked by adblockers, if you optimize for them, you might be driving away tech-savvy people who do use adblockers (since they're basically invisible to you).