An RTOS has some advantages, but also disadvantages.
It is possible to run an RTOS on an AVR (Both FreeRTOS and ChibiOS fit, and some other too) but an RTOS is not a good fit for an AVR.
Firstly, the ATmega328 only has a few kB of RAM, and you have to cut this in peaces to have a stack for each task.
ATmega series also have 32 registers which all have to be saved (and others popped again) on each task switch.
ATmega's also only have a single ISR level, there are no different priorities, and because ISR's are also used for the task switching itself, this increases the ISR latency for all ISR's a lot.
An RTOS is also not a magic bullet. It can help with keeping overview in a program, but it comes at a price of extra complexity, both for the added overhead of the RTOS kernel itself, but also for the added complexity of inter process communication. You need to use semaphores queues and message boxes to keep your program "thread safe".
Multi tasking systems have existed from the early days of computers, simply because a computer was very expensive in those days and a single computer had to be shared with many users. In the very early days it was only batch processing. You prepared a program in the form of a stack of punched cards, and someone else put the stack in the machine and you got notified when your program was ready. Multitasking allowed a lot of users to interact with a single computer (via terminals) at the same time, and those users had to be separated from each other, and thus preemptive multitasking was a must.
In these times microcontrollers have outgrown computers which were considered quite capable in their time. My first pc was a 80sx386 at 16MHz and 4MB of RAM, and now (apart from the temporary shortage) you can buy a microcontroller for EUR10 that has more memory and can add a uSD card that has much more storage capability than hard drives of that era. Using an RTOS also makes it easier to use libraries as modules such as Wifi or FSFat.
Microcontrollers with multiple processor cores are also becoming more common, such as the ESP32 or the Raspi4020, and adding an RTOS which is aware of this also makes it easy to use of both processor cores.