I wonder, will get locked out of the main storyline if I activated cheat code after tutorial? I'm only planning on buying health potions to sell it for money
Cheat code affects when you decide to get key items that involves follow the story, meaning that you can also soft lock some characters.
Potions or recipes can be unlocked just by learning them or doing them at least once so that is not a huge problem, so as long it's just average items you shouldn't lock important stuff.
My recommendation: Just use the cheat thing when you already did certain task so you don't require to farm items.