Pedals turn but bike doesn't move The bike I am riding is an older mountain bike that is a cheaper model, likely from Walmart or somewhere similar. I picked it up at the flea market and have been doing repairs on it as a way to learn more about how bicycles work.
I was in the middle of a ride when all of a sudden I lost the ability to use the pedals to ride the bike. The pedals still turn, but they do not seem to be able to turn the wheel. There is some resistance to pedaling, but I think something might have happened in the bottom bracket or in the connection between the pedal arm and the bracket. I took the bike home and flipped it over and am able to pedal it fine. I think the issue only comes up when weight is being put on the back wheel.
Any insights on how to get the bike working normally would be greatly appreciated!
Here are two videos showing the problem:

Vertical view down from the riders perspective: https://streamable.com/k1ldza

View from the side: https://streamable.com/hkhp93
Judging from your videos, it appears that the chainrings and crank are no longer connected. It appears that you have something called a one-piece crankset. If you are confident that you can learn how to disassemble it, I’d say you’re up for the repair.
Once you have the crank off the bike, you’ll be able to see how the chainrings and crank arm are connected. Assess the interface. Is there a threaded ring that may have come loose? Be aware that the hole mounting the chainrings to the crank arm is a D shape, and the fact that it’s able to spin like that may mean that the D shape has been destroyed and turned into a full circle. In that case, the crankset is likely not repairable. A welder could fix it though.
Let me know if you get the cranks off the bike, and then we can go from there. As an aside, your cable routing seems iffy: are there no braze ons to tie the cables to? I don’t believe a bike manufacturer would just zip tie the cables around the frame like that. It’s not an issue other than cosmetics though. It almost feels like the brakes are mismatched too. Why is the cable looping around itself like that?