When operating the Pi headless in unknown environments often the only way to access it is to connect via ssh. But what to do if the Pi does not work in that environment better said is not accessible via ssh because it did not get an IP address for example. You don’t want to carry a HDMI-capable monitor and a USB keyboard to avoid that situation!
For my Arduino projects I have some FTDI breakout boards which have have level shifters included (you can switch between 5V and 3.3V and the Pis need 3.3V TTL).
After enabling the serial console with raspi-config and rebooting you’ll get the kernel output while booting and after that a login prompt. At the other end you can use minicom or screen to read/write serial data, I prefer screen.
The connections I made: Pi pin 3 (GND) to FTDI GND, Pi pin 4 (TX) to FTDI RX and Pi pin 5 (RX) to FTDI TX.