Originally, Hitler and Goebbels, at least in the 1920s, were passionately anti-capitalist but once the Nazis became a real force in German politics during the 1930s, Hitler realised he would need the support of the small-c conservative middle-class and the big industrial corporations and their capitalist owners so he kinda capitulated to them. After that, he needed to purge the Nazi party of its radically left-wing socialist elements to appease the middle and upper classes. Hitler continued to use the rhetoric of socialism in his speeches but he misunderstood the concepts of socialism and instead started referring to Germany's economy as 'productive capitalism' as opposed to the laissez-faire 'parasitic capitalism' they associated with international Jewry.
Socialism by its very definition, as defined by the likes of Marx, Kropotkin, Proudhon and Bakunin, is an economic system where the workers own and control the means of production. A lot of people, particularly in the US but also here in the UK and Europe, falsely believe socialism is about high taxes, nationalised industry, universal healthcare, a welfare state and state ownership. That isn't socialism; it's social democracy based on Keynesian economics which is inherently capitalist and people on both the right and the left make this common misconception. For socialism to exist, the workers have to own the means of production, not the state, private corporations or individuals. This is why modern socialist theorists don't class the Soviet Union, China, North Korea, Venezuela etc. as socialist because those countries' governments controlled the means of production, not the workers. You can have state socialism like Yugoslavia under Tito where the government ensured the workers' ownership but the state itself did not own industry, agriculture or land, or you can have stateless socialism (social anarchism) like Catalonia during the Spanish Civil War where workers' ownership was ensured by trade unions and the community. That brings me on to another misconception about socialism: private property. There's a big difference between private property (property that generates capital based on other peoples' labour, e.g. factories, large farms) and personal property (personal possessions, e.g. a house you occupy, TVs, vehicles, laptops, phones, tools etc.). Socialists want to abolish private property so that people can't generate capital and revenue on the work of others but personal property is fine and actually encouraged.
The Nazis under Hitler ensured private ownership, therefore they can never be classed as socialists. Otto and Gregor Strasser on the other hand wanted to establish a German workers' state, a German socialist republic, where private property would be abolished and German workers controlled the means of production. Hence, why they were purged by Hitler and his supporters.