Not quite. Depends where in the world you are.
It all stems from the evolution from 2-3-5. In that formation, it was quite straightforward in terms of numbers. 2 and 3 were full backs; 4 & 6 half backs; 5 centre back; 7 & 11 outside forwards, 8 & 10 inside forwards & 9 centre forward:
View attachment 219852
Different countries modified this when the changes in the offside law meant that more players needed to be in defence. In the UK, we moved the centre half and the left half back into the middle of the defensive line and the 7, 8 & 11 to join the 4 in a midfield four, leaving 9 & 10 as forwards:
View attachment 219847
In South America, however, things were different. Not only was 4-3-3 preferred but they'd moved different roles. 5 stayed as the central defensive midfielder in both Brazil and Argentina but the two defensive numbering systems were different:
Brazil:
View attachment 219848
Argentina:
View attachment 219849
In Spain (and a lot of Europe), it was different again with 2-4-5-3 being the defence and 6-8-10 being the midfield - hence those numbers now being used to describe a midfielder's role in the team:
View attachment 219850
Modern cases in point:
Javier Zanetti wearing 4 at RB for Argentina, Roberto Carlos wearing 6 at LB for Brazil with Lucío wearing 3 at CB. Xavi wearing 6 for Barcelona and Spain.