May ways to do this depending on what material you are using. I do a single row of either 4" or 6" tiles at Habitat for Humanity houses. I use Power Grab in a caulking tube. Spread a bead around the edges (slightly in from edge) and then press against the wall. Ensure there is a small gap below the tile. We use cardboard spacers that are designed as sheetrock shim material. However, any thin cardboard will work.
You can use tile mastic. If doing glass tile be sure to use white.
Here is the easiest way I've found to do it: https://thehoneycombhome.com/how-to-install-subway-tile/