I think you forgot to share the play in question, so it's kinda hard to tell.
The pot is shared when both players have the same best 5 cards. So you can have the same hand than your opponent (ex : AQo) and loose cause he has a flush and you don't. You can also have different
hands and still split. Example : You have AKs of clubs and your opponent has AQs of diamond. The board comes to AKQ43 of spades. In that case, the 5 best cards are already on the board, so you share.