Cheapness is a relative concept and depends on the state of the market and the season, on region where you live, depends on whether you are ready to buy clones and how long you are willing to wait for delivery... etc...
1 pc or 1000+ pcs?
If you are looking for ordering just few from aliexpress, you might find that some arduino or stm32 devboard is costing less than bare chip.
you should draw up a requirements-specification
this should give you an idea of the processor requirements in terms of computing power,
memory (flash and SRAM), IO (I2C, SPI, GPIO, Canbus, ADCs, DACs, etc), WiFi/Bluetooth/LoRa connectivity etc
you then select a microcontroller to meet the requirements allowing some room for expansion (when prototype is operational end-users always ask for more functionality)
Are you looking for a CPU chip or an assembly such as the Arduinos? There is a big difference. I know of no cheep CPUs but I know of inexpensive ones. I have seen CPUs in the sub $0.20 price range but they were purchased in the millions. That same part was about a buck in small volume.
The general design process is to determine the needs then shop for the parts. It appears you are trying to do it backwards, that takes a lot more time and will cost more.
ATmega8 has nice compatibility with Arduino (was the original Arduino chip, in fact.)
How much are you paying for them? They tend to run about $1 each from Aliexpress, especially for the SMT versions. Digikey wants $3 each (for DIP), making them more expensive than the default ATmega328P or (new and improved, but a bit riskier WRT Arduino support) AVR16DD28.
There are assorted "very cheap" CPUs once you give up Arduino. Down to about $0.03... (well under $0.50 for RISC-V, ARM, or 8051)
By the time you develop a product, there may be a better fit so what about that development investment?
With AVR families like ATmega8 to 328 there is some sense to develop with the biggest and see which is smallest that can hold and run the final code. Within a family, all are pin compatible so you can develop a prototype board along with the code and the smaller, slightly cheaper chip will work.
However --- there may be a board that will do, already made in the millions, tested to death that you may never beat the price.
USBASP is one such example. Develop for that saves big in many ways especially if what you want to do is small and won't take long to finish.
The I/O pins are multiplexed with different signals or functions.
PWM is output on the WOn pins (Waveform Output -n).
You need to look at the table in section 5 of the datasheet to see which physical pins are used for WO.