I would like to prevent other companies or individuals from getting a patent on the idea, so that someday I can continue the idea without a patent problem.
Publication.
One of the best forms of publication is a patent. It's not desperately expensive to file an application, with no intention of proceeding to grant. It gets published as an application anyway. The big money needs to be spent to get the patent to grant, and then to renew the patent again every few years to keep it current to prevent other people manufacturing and selling your idea. Any patent examiner will check your competitors' patent applications against all patents and applications as a matter of course.
There are specialist magazines that exist solely for the purpose of publication, short of a patent application. In my patent department, we used to joke about the 'Icelandic Pig Breeders' Gazette' (not sure whether that was the actual title) and other such obscure publications where such patent 'poisoning' disclosures would be made, in any subject, mine was signal processing. Patent examiners search these as a matter of course as well.
Publication on YouTube? Not so sure. For an examiner it would be like looking for a video of a needle in a field, no, a country, no, a continent of haystacks. Patent examiners will not search for such a publication. If the title and keywords are good and descriptive, they may show up in a general search. Where such a publication would work is if you know that an application has been made, and you oppose it, citing the video as evidence. But you would have to know that an application had been made. Alternatively it's years perhaps decades later, you've commercialised your idea, you're being sued by a patent holder, and you're seeking to show that his patent is invalid over your prior publication. Is your posted video still retrievable, does YouTube still exist?
GitHub. Probably better than YouTube. The description will of course be text and picture files. Much better than a video of pictures and text, or listening to a description.
Whatever the publication route you choose, it needs a robust date mechanism that patent offices will accept as proof of publication prior to a specific date. I don't know how well accepted legally the mechanisms of YouTube, GitHub or any blog sites are. I've been out of the game for few years now, but I would imagine there's space in the market for a blockchain-based patent poisoning disclosure publication service, if there isn't one already.
You don't need to build a working prototype, or show it working. You do need to disclose how it works. That means at least a block diagram and description, sufficiently detailed so that 'one skilled in the art' can reproduce your invention from the publication. Read a few patents, and you'll get an idea of the level of detail that's required.
Protection from others' patents is probably the least of your worries if you want to commercialise your idea later. Simple economic competition will require the big bucks, if the idea is any good.
I would imagine the date mechanism on StackExchange is no worse than that of GitHub or YouTube, so you could do worse than to publish here, starting now. Normally, people get all coy about sharing their ideas if they think they might want to patent later. However, yours is the opposite. So, what's the idea? Give us the 20 second elevator pitch. You might get some better targetted advice then on how best to proceed. It might even turn out that your idea is anticipated by prior art, in which case you don't need to do anything.