Four is a square number and the number of sides on a square. It reads as a solid, closed shape in most fonts.
Use 4 for 4th place, quarters, grids like 4x4, and HTTP codes like 404.
The digit 4 has an open top in many handwriting and gothic styles, and a closed triangle in many print fonts. When a code must be copied by hand, pick a plain style so the shape is the one people expect.
In much of Europe the digit 4 is written with an open top, while North American handwriting often closes it. Both shapes are understood, so pick the one that matches the style you use.
Digit styles keep the meaning of the number, but a screen reader may read a circled or superscript digit as a symbol instead of a number. Use plain digits for prices, dates and anything that must stay exact. The Unicode compatibility checker shows what your device can display.
Use 4 symbols for dates, ranks, scores, usernames, lists, and short profile text. Circled numbers are easy to scan, superscript works well for ordinals, and bold number fonts stand out in names or headings.