There’s a great example on the A-Frame docs for building an advanced scene. This will teach you how to create custom components, work with raycasting and create some basic gameplay. All in just 30 lines of HTML.
Advanced Scene tutorial