You'll see ads on your Windows lock screen if you have Windows Spotlight set as the display option. These ads often promote different games, and sometimes Microsoft also shows tips on various topics.
Press Ctrl + Shift + Esc to open Task Manager. Click the Startup Apps tab. Find Microsoft Teams in the list. Right-click it and select Disable. This stops Teams from launching when Windows starts.