Collisions between heap and stack are somewhere between "extraordinarily unlikely" and "physically impossible" on a modern computer with a 64-bit address space and virtual addressing. For example, on the computer I'm typing this on, the heap of an arbitrarily selected process currently ends at 0x0000_562c_9643_8000 and the next higher chunk of address space that's in use (which isn't the stack, it's a memory-mapped file) begins at 0x0000_7f8f_02e0_0000. So there's a little more than 245 bytes of unused address space (≈ 41 terabytes) that the heap could grow into. The computer only has 32 gigabytes (for ease of comparison, that's 235 bytes exactly) of physical RAM; any program that allocates an unbounded amount of heap memory will hit that limit first.
It is still easily possible to run out of stack space, though, because the stack is given a maximum size on process creation and that size is usually not very big. For the same process, the stack size limit is 8388608 bytes, or exactly 8 megabytes. However, there's roughly 443 gigabytes of unused address space in between the stack and the next lower chunk of address space that's in use (remember that hardware call stacks grow toward lower addresses); the stack limit is small not because there isn't room, but as a guard rail. Most programs don't need deep recursion, but infinite recursion is an easy bug to write, so we set the stack limit fairly small so that infinite recursion will be trapped quickly. Programs that do need deep recursion can ask the operating system for a bigger stack. On Unix, this is done with the setrlimit system call for the initial thread, and pthread_attr_setstacksize for additional threads; I don't know what the Windows equivalents are.
The previous major generation of CPUs had 32-bit address spaces with virtual addressing. 232 bytes is only 4 gigabytes, and often a quarter, or even half, of that was reserved for the OS kernel. Even so, collisions between heap and stack were rare. Typically, on those systems, the program, static data, and the beginning of the heap were loaded very close to address zero, and the stack began at the highest address that a user space process could use, leaving a gap of at least a gigabyte between them. Programs that need to allocate an entire gigabyte of heap are rare, and were even rarer back then. (The stack limit was still in the range of 8 megs, and so you did have to tweak that sometimes.)
Collisions between heap and stack are a real concern when programming for CPUs with 8- or 16-bit address spaces, and CPUs with 32-bit address spaces that don't implement virtual addressing. These are no longer used for full-sized "computers" but are still relatively common as "microcontrollers" to be "embedded" in gadgets of one stripe or another. "Retrocomputing", programming within the limits of certain 8- and 16-bit computers that were widely used in the past, is also a popular pastime. If you are interested in doing either embedded programming or retrocomputing, you will need to consult the documentation for the specific small environment you're working with, to learn how to configure the space available for the stack and the heap.
As a final note, please be advised that geeksforgeeks is notorious for inaccuracy. In this case, it appears to me that the article was written by someone who learned C programming in the days of 16-bit Windows and hasn't bothered to update their understanding since—even though the examples quote addresses that indicate they ran their test program on 64-bit Windows. Do not take anything you read on that site as definitive truth. This doesn't mean you shouldn't consult it at all, it just means you should always cross-check what you read there against some other reference. If you can afford them, I strongly recommend investing in paper copies of the textbooks Computer Systems: A Programmer's Perspective and Advanced Programming in the UNIX Environment; these are also somewhat out of date but their general accuracy level is much higher. (If you can't afford them, see if you can get them from your local public library.)