Full width of the textbox on the screen or not

Apologies if this comes as a naive question.

From design point of view basically a textbox control (or any control) in a grid container, does it makes sense to have a textbox in fullwidth of the screen.

For e.g. if we have a form with one textbox. On full destkop screen it would look weird to have a textbox to the full length of the screen. The same textbox would look good (or ok) on mobile devices.

Any thoughts or suggestions?

Using flex instead grid would help in this?

Thanks