And how did first waves generally end ?
If they were not all killed in no-man's land- and this was not usually the case in a major offensive- they would occupy part of the enemy trench. Depending on their instructions, they would then either push on to the next trench line or work sideways down the trench line. Many battles were characterised by this sort of fighting, which typically involved shovels, pistols and grenades. As trench lines were cut in a sort of saw-tooth pattern, the fighting could be at close quarters.
Often, this occupation party would be compelled to retreat if it could not be adequately supported, or if the breach could not be widened and the attackers were therefore being attacked from two or three sides. They would often have to await darkness, covering fire, or retreat into no-man's land. If they could not retreat or be supplied, they might be compelled to surrender.
Often, a battle in the front line trenches would take the form of the attackers trying to reinforce their gains faster than the defenders could mount counter attacks. Eventually, the trench would become untenable for one side or the other.
In battles like Verdun and Third Ypres, the landscape was so completely demolished that an attacking wave would just sort of occupy a series of shell holes, which might be the furthers they could get before being pinned down. They might then seek to dig these into a defensive position.