I have solved this issue. Here is how.
It seems that teams uses Office 356, and my Office version was 2013. Thus there was a conflict in teams when I asked teams to open assignments by using the Open in Desktop App.
You need to install Office 356 and uninstall Office 2013 (or your version). Then you can start working with teams normally.
After this change in Office versions, you might need to assign apps by file types. Eg, to open a word doc (.doc) you need to assign word to open it. You do so by going to search on the desktop, type in Default Apps, choose default aps
by file type, and then assign which default app opens what. Eg: .ppt assign Powerpoint ; . xls assing Excel, and so on.