While a whole piece on the German military after the surrender would be too large, but I'll give an overall picture.
I must emphasize this answer is only about post-war Western Europe. Treatment of former Wehrmacht in the East by the Soviet Union is an entirely different matter.
The Western Allies anticipated needing to deal with the resulting humanitarian crisis which would accompany liberating Europe. Governments and infrastructure would be smashed to pieces. Millions of POWs would have to be dealt with. And the population, particularly of Germany, would need to be re-educated.
In 1941 the British established Intelligence Training Centre of the British War Office "to train officers in postwar reconstruction and other missions incident to military operations in foreign countries". In other words: military government. The US Army formed their Civil Affairs Division in 1943 to take responsibility for 80 million Europeans. Great pains were taken to make this military government in contrast to the Nazis, fair but firm, to ensure Nazism did not return. However, there was much debate over whether to let the Germans rot or to rebuild.
Food, clothing, shelter and supplies were initially provided by the Western Allies. A Civil Affairs Officer would arrive at a captured town, contact local leaders, and re-establish local government. As much as possible, the local people would be recruited to distribute food and supplies. Historian Mark Felton goes into detail about what happened next in his short Occupying Germany 1945 - Western Allied Military Government.
The Allies wished to both reduce their POW burden and return these soldiers to civilian life. Many POWs resided in the US, Canada, Australia, and Britain. But almost two million POWs were in Europe. They were transferred to Prisoner of War Temporary Enclosures or Rheinwiesenlager and designated Disarmed Enemy Forces to get around regulations about treatment of POWs. These camps were overcrowded and conditions were very poor. They were managed by the Germans themselves: doctors, cooks, and even the guards. Red Cross efforts were hampered.
Prisoner releases started with Hitler Youth and women with no Nazi affiliation. Priority was given to professionals to help rebuild Germany. POWs and civilian leaders went through a process of "Denazification" to screen out war criminals, SS, and die-hard Nazis before release.
Some returned to civilian life, but many were used as forced labor sanctioned by the Yalta Conference to repair the damage German had done to other nations. 740,000 US POWs went to France to labor and clear mines. Norway also used "disarmed forces" to clear mines. Civilians in the US occupation zone were also used as forced labor.
Many of the 400,000 POWs in the UK were used for forced labor, particularly agricultural work. By 1947 most were repatriated to Germany, with about 24,000 choosing to remain in Britain as free men.
By 1948, most of the captives had been released, with France taking until 1949.
The Western Allies found it useful to keep some German military units intact. The US army was eager to demobilize its military. German soldiers were first used to do the dirty work of cleaning up after the war, then to retain order in Germany, and finally to rebuild a bulwark against the Soviets. Some were unarmed, but some were under arms.
Mark Felton has done a number of short pieces on specific instances. Here's a few, but be aware these are the interesting stories, not a common experience.
The Baltic states of Estonia and Latvia were annexed by the Soviet Union in 1940, then conquered by the Germans in 1941. Some were recruited into the SS, sufficient for three divisions, many to fight the Soviets under the lure of gaining their independence after a German victory. After the war, they became displaced persons; if they returned to their countries they would face punishment by the Soviets.
The Western Allies were sympathetic to the position the Baltic States were put and did not treat these SS soldiers as they did German SS. The Nuremberg tribunal viewed them as conscripts and freedom fighters.
Having to deal with displaced persons and needing trained troops, the US killed two birds with one stone. In spring of 1946 they re-trained and rearmed companies from former Estonian and Latvian SS. One of these helped guard the Nuremberg Trials.
Needing to deal with large numbers of sea mines left over from the war, the British formed the German Mine Sweeping Administration in June 1945. This consisted of 27,000 Kriegsmarine sailors and officers in small, disarmed warships to sweep mines. They were paid and given leave.
Fearing it would become a kernel for a new German Kriegsmarine, the GMSA was disbanded in 1948.
Once again, the British were faced with a problem of clearing mines. This time in Denmark. The Danes and British decided to use Germans to clear the mines: they'd laid them, they'd be the best people to clear them. To get around the prohibition of using POWs to clear mines, they declared them "disarmed forces". Minenkommando Dänemark was formed May 11th, 1945 from 2600 German soldiers and officers still in uniform overseen by 52 Danish officers. They were given a few unarmed armored vehicles to help with the laborious process.
They were disbanded in August 1945 after clearing 1.4 million mines with 49 killed and 165 seriously wounded.