What is the most correct way to implement a search mechanism that changes the UI content

I had an argument with my colleague about what is the most correct way of implementing a search funcion that allows to change the page content.

Basically we had 2 options, one is in page search, where we'd have an field with a specific information, like Order ID, and would be able to transform to a "search" field after a hotkey, so the Order ID field would be used as a search field.

And my option is, kinda same thing, but have some "pop-up" field where you would insert that value to search.

Help me decide which way is the most "correct".

I hope I made myself clear, if not, feel free to ask questions.