おはようございます is the polite morning greeting. It holds until around noon, then こんにちは takes over.
JLPTN5
おはようございます
Say おはようございます to anyone you meet before noon: a teacher, a neighbour, someone in a shop. With friends and family the short おはよう is enough. Work is the exception the clock does not cover — in many workplaces おはようございます is what you say when your shift starts, whatever time that is.