'Put up' has lots of meanings -
here are three of them.
'Put up' can mean 'to build'.
'Tim's just put a new shed up in his garden.'
'I'm going to put up a new wall.'
'Put up' can mean 'to struggle for
or against something'.
'I thought you were going
to lose but you really
put up a good effort.'
'We can stop this if we put up a fight.'
For these two meanings
the direct object could go
either before or after the 'up'.
If you 'put someone up'
you allow them to stay somewhere.
'Don't worry about a hotel -
we can put you up for the night.'
Here the direct object
has to come before the 'up'.
So it can mean 'build', 'struggle' or 'let stay'.
Do you know any other meanings?
'You put up a good effort
to put up that wall.
Now you must be tired -
I can put you up if you like.'