Thanks to all those who replied. Yes, I know I can simply convert these videos into another format with HandBrake, and yes, once I do that, Quick Look has no problems showing them. But that really defeats my purpose for using Quick Look with these files in the first place. The videos I'm trying to use Quick Look with were shot with a dash cam, and Quick Look (normally) makes it real easy for me to scan through multiple dash cam videos without having to open each one in Quicktime Player or some other program.
To clarify, my old dash cam was a Rove R2-4K, which shot H.264 videos, and Quick Look had no problems showing videos that were made with that dash cam. But my new dash cam is a Rexing V1P Max, which shoots with either H.264 or H.265, and Quick Look cannot open those videos, whether the dash cam was set to use H.264 or H.265.
However, since my Mac's Quicktime Player can open and play these Rexing V1P Max videos (whether created with H.264 or H.265) with no problems, I guess I'll just have to go that route instead from now on. It's not nearly as convenient as using Quick Look, but it'll work. :-)
Thanks again for the replies.