Buying bicycle online vs from shop vs second hand and procedures

I have some elementary questions about bicycles:

– Is it okay to just buy one from amazon, assemble it and ride away, or do I need to do some procedure (registration or such). I can do basic assembly unless something complicated needs to be adjusted.

– I've heard shops sometimes refuse to repair online-bought bicycles, is there such a problem?

– Price wise, are shops significantly worse than online like in many other items?

– How do you compare these 3 buying options (online, shop, second hand from somewhere like mercari or jmty?)

– Is there a common, no headache brand that doesn't cost half a salary?

by joiSoi