Actually, it says that white resigned. You were black. You won.
Why did it say I played worse than my opponent?

But it does say that white's accuracy was slightly higher than black's.
I don't know. White played the only big blunder. You both played similar numbers of book and best moves.
I can't see anything that immediately explains it. The ways of the computer are inscrutable sometimes.

I can't see anything that immediately explains it. The ways of the computer are inscrutable sometimes.
The crux of the issue is that a higher accuracy does not mean that white "played better". And a very-very slightly higher accuracy means even less.
So there is pretty much nothing to explain. They played roughly the same level, white blundered, black won. No mystery here.

The specifics of how chess.com calculates accuracy aren't published, I believe. We therefore can't walk through its algorithm and categorically explain why your accuracy score ended up exactly what it was.
The general consensus, though, at least from what I've found, is that it's largely based on the average change in the evaluation bar from every move that is played. If you make a move and the eval bar goes from +0.3 to +0.1, you have lost 0.2. The smaller this total loss... or more likely average loss in a game, the higher your accuracy will be. While the game review will categorise your moves, these cover a fairly wide range and, if I recall correctly, have overlap in terms of centipawn loss depending on the context. ie. a move going from -20 to -30 may not be considered a blunder while a move going from 0 to -10 could be, but these might still have similar effects on your accuracy score.
Do note that this is largely speculation and not to be taken as gospel.
It's also worth noting that accuracy here isn't necessarily how perfectly you've played, but how accurately you've matched what the computer would play in the same positions you have reached. The accuracy score assumes the computer is infallible, which is it far from.

The general consensus, though, at least from what I've found, is that it's largely based on the average change in the evaluation bar from every move that is played. If you make a move and the eval bar goes from +0.3 to +0.1, you have lost 0.2. The smaller this total loss... or more likely average loss in a game, the higher your accuracy will be.
Is this the general consensus, really? Weird. It is certainly false, all you have to do is apply a little logic.
In this game white went from 0 (the opening position) the -10 (the end position) in 31 moves. So his average is roughly -0.3 per move. Likewise, black is +0.3 per move. So if accuracy calculations was based on this, it would show a huge difference in black's favor. Which it does not.

That's... completely misunderstanding what I said
If you look at each individual move made by one player, from the position they are in and take the difference in evaluation, that is not the same as taking the start and end positions.
To explain what I mean, I've created a very short "test" game: Chess Analysis Board and PGN Editor - Chess.com
White moves:
1. 0.0 -> -0.1 (change of -0.1)
2. 0.6 -> 0.6 (change of 0.0)
3. 0.75 -> 0.4 (change of -0.35)
4. 1.10 -> 0.36 (change of -0.74)
5. 0.49 -> 0.37 (change of -0.12)
6. 4.60 -> 3.09 (change of -1.51)
Black moves:
1. -0.1 -> 0.6 (change of 0.5)
2. 0.6 -> 0.75 (change of 0.15)
3. 0.4 -> 1.10 (change of 0.7)
4. 0.36 -> 0.49 (change of 0.13)
5. 0.37 -> 4.60 (change of 4.23)
6. resign
If we just take the start and end position like you've calculated, while went from 0.0 to 3.09 over 6 moves, giving them an average of +0.515 per move, and black an average of -0.515 per move, conversely. This is obviously not a useful metric because it counts your opponent's inaccuracies as your accuracy.
That isn't what I said at all, though.
If you take each change ONLY from the moves played by the individual players:
White has an average eval loss of 0.47
Black has an average eval loss of 1.142
To clarify, white's is caluclated by
0.1+0.0+0.35+0.74+0.12+1.51 = 2.82
2.82/6 = 0.47
And black's is calculated by
0.5+0.15+0.7+0.13+4.23 = 5.71
5.71/5 = 1.142
I don't really feel like going through OP's 31 move game to do this for all of that, but it is generally thought that this is at the very least a factor in the accuracy score. Average centipawn loss is a common metric for measuring accuracy of play.

But as you've said, there isn't really much to explain here. Both sides played roughly as well as each other and got roughly the same accuracy scores. While it gives a specific number, that number is not to be taken as a hard and fast measure of how well you've played and really ±5% is likely within its error bounds. At best, it is a measure of how closely you matched computer moves, which would vary between different engines running at different depths/given different amounts of time to calculate, anyway.

Thanks for the response guys. I understand it now. But I have one more question. Why did it say that the oppenent played better than me in the endgame. I was up two bishops.
Title.
Game for reference (I played as black):
https://www.chess.com/analysis/game/live/80967661531?tab=analysis