Unnexpected Behaviour From Software UART On ATtiny84A AVR
The timer interrupt-flag is reset incorrectly. An interrupt flag is reset by writing a 1 to it, and not a 0.
TIFR0 &amp;=~ (1 &lt;&lt; OCF0A);
       ^ Incorrect

It should be
TIFR0 |= (1 &lt;&lt; OCF0A);

See Section 11.9.7 of the ATtiny24A/44A/84A datasheet (2020 version - Revision A) listed here

...OCF0A is cleared by hardware when executing the cor-
responding interrupt handling vector. Alternatively, OCF0A is cleared by writing a logic one to
the flag...