A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Just to check, does this happen in all workbooks, or only one file? Also, are you entering data inside a formatted Table, or just normal cells?
In Excel for the web, I do not see a setting that changes this behavior. The desktop Excel option is under File > Options > Advanced > After pressing Enter, move selection, but Excel for the web does not have the same full Options menu.
For now, please try this workaround:
Select the data entry range first, for example A2. Then enter your data and use Tab. Excel should stay within the selected range instead of continuing freely across the sheet.
If you have the desktop Excel app, another option is to click Open in Desktop App and enter the data there.