Technical moats are the worst ones. The absolute best you can hope for is patents, but those take years to issue and then you have to fight after tbe fact. Trade secrets are nice but hard to defend.
The best moats are scale (Walmart), brand (“Google” means search), network effects (Facebook, TikTok). None of those are perfect but all are better than just having better tech.
Facebook and TikTok could collapse in under a year, that has happened before. Network effects seems very brittle: AIM or Fotolog doesn't exist, and they were huge. MySpace is a shadow of what it was.
OTOH, WD40 has a technical moat since 1953, without a patent. There are a number of companies who rely on technical moat mixed with excellent technical image: Makita or Milwaukee Tool come to mind. You can have also a company based on technology moat that theoretically shouldn't exist (patents expired, commodity products), but it does (Loctite, 3M).
The best moats are scale (Walmart), brand (“Google” means search), network effects (Facebook, TikTok). None of those are perfect but all are better than just having better tech.